Other than text, HTML allows placing of static and/or animated images in an HTML page. HTML accepts two pictures file formats .gif and .jpg. A picture can be inserted into a web page using the <IMG>, which takes the name of the images file (filename.gif filename.jpg or filename.jpeg) as an attribute. In addition, HTML also allows control of the height, width, border and so on, of every image placed on the web page. The <IMG> tag takes the following attributes:
BORDER Specifies the size of the border to place around the image. This attribute should be specified in the CSS.
WIDTH Specifies the width of the image in pixels.
HEIGHT Specifies the height of the image in pixels.
css/style PADDING Indicates the amount of space to the left, right, top and bottom of the image. This attribute should be specified in the CSS.
ALT Indicates the text to be displayed in case the Browser is unable to display the image specified in the SRC attribute.
SRC Specifies the location and name of the image file.
2 blog comments below
.png format also accepted by html
ogah on Sat Jul 09, 2011 3:01 pm
Bikerman on Sun Jul 10, 2011 12:58 am