Share on Google+Share on Google+

HTML5 img tag, Implementation of <img> tag.

Here, we will implement <img> tag.

HTML5 img tag, Implementation of <img> tag.


Here, we will implement <img> tag. The <img> tag is used to insert image in a document. The image is presents as part of web page. But it is important to know that image is not a technically part of wep page. Generally, Maximum browser supports only GIF, JPEG and PNG format.

Attributes of <img> tag   :
src-- Defines address(URL) of image.
altr-- Text to display if image not display.

Declaration Syntax :

Declaration syntax of <img> in HTML5.

                           <img src="URL" altr="TEXT" />

Example of <img> in HTML5:

<!DOCTYPE html >
<title>Title of Document</title>
<h1>HTML5 img tag.</h1>
<h2>Example of image. </h2>
<img src="RoseIndiaPick.jpg" ><br>
<i>This is the logo of RoseIndia.</i><br>
<h2>Secongd Image.</h2>
<img src="RoseIndiaPick" alt="RoseIndia Image" height="19">

Download this code

Difference Between HTML5 and HTML4.01:

The img tag is available in both HTML5 and HTML4.01. So there is no difference.



Posted on: September 7, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.


Advertisement null