Image Formats

Syntax: <IMG>

Inline Images in HTML: <IMG>


The IMG element specifies an inline image. The required SRC attribute specifies the location of the image.


The image can be any format, though browsers generally only support GIF, JPEG, and PNG images.


Code example below




<img src="/../Images/logogold.jpg" />




Image after text text after image.


Image before text&nbsp;<img src="/../Images/home_32.gif" />&nbsp; text after image.



Images as a Links


Images and Links<a href="/index.php"><img src="/../Images/arrow-back_32.png" /></a>



If you include both and image and text in the anchor both the image and the text itself become hot spots, pointing to the same document.


If you include both and <a href="/Default.aspx"><img src="/../Images/arrow-back_32.png" /> image and text</a> in the anchor both the image and the text itself become hot spots, pointing to the same document.