Image Tag

Image Tag: <img>

The <img> tag is used to insert an image on a HTML page. It does not have a closing tag. The most commonly used attributes for an <img> tag are

src: to specify the url of the image
alt: to specify the alternate text to displayed if the image is not available
width: to specify the width of an image in pixels
height: to specify the height of an image in pixels

Code:

<img src="/images/tutorials/berries.jpg" alt="Berries" height="200" width="200" >

Displayed as:

IMG tag example
Last Updated: 30-April-2013


Post a comment

Name

Your Comment

Email (We dont publish it)

Comments

Nothing yet..be the first to share wisdom.