This website may use cookies. More info. That's Fine x
Welcome Login

img tag

<img> tag defines an image in an html page.

<img> tag has two required attributes: src and alt.

Images are not technically inserted into an html page, but images are linked to html pages.

The <img> tag creates a holding space for the referenced image.

To link an image to another document, simply nest the <img> tag inside <a> tags.



<img src="smileyface.png" alt="Smiley Face" height="48" width="48">




Attribute       Value             Description

src             url               Specifies the url of an image

alt             text              Specifies an alternate text for an image

height          pixels            Specifies the height of an image

width           pixels            Specifies the width of an image

usemap          #mapname          Specifies an image as a client-side image-map

ismap           ismap             Specifies an image as a server-side image-map





For more information, see here.

Created on: Monday, December 23, 2013 by Andrew Sin