HTML allows images in the HTML page. It is accepts two picture file formats GIF and jpg. Using tools GIF constructor or Abode Photoshop, image can be created to suit the requirements of the web page and saved in these file formats. Image inserted into the web page using the <IMG> tag. HTML also control height,width,border,etc of every image on the web page.
<IMG> tag :- The <IMG> tag is used to add image on HTML document. It does not require the closing tag. Syntax :
<IMG SRC=”URL”ALT=”ALTERNATIVE text”>
- SRC :- The SRC is define the URL of the image. It is identifies the image to used with its type.
- ALT :- The ALT is indicate the text to be displayed in case a browser is unable to display the image.
Attributes used with the <IMG> tag.
ALIGN :- This attribute used to manage position of image in the web page. Align attribute take the five values Left,Right,Top,Bottom and Middle. Syntax :
<IMG SRC=”URL” ALIGN=”Left/Right/Top/Bottom/Middle”>
WIDTH/HEIGHT :- Attributes is used to manage width/height of the image in pixels. Syntax :
<IMG SRC=”URL” WIDTH/HEIGHT=”pixels”>
BORDER :- Attribute is used to manage size of the image border. Syntax :
<IMG SRC=”URL” BORDER=”pixels”>
VSPACE := The VSPACE is indicate the amount of space to the left and right of the image.
<IMG SRC=”URL” VSPACE=”pixels”>
HSPACE :- The HSPACE is indicate the amount of space to the top and bottom of the image. Syntax :
<IMG SRC=”URL” HSPACE=”pixels”>