Home Tutorial Html Html5 HTML5 img tag, Implementation of <img> tag.

 
 

HTML5 img tag, Implementation of <img> tag.
Posted on: September 7, 2010 at 12:00 AM
Here, we will implement <img> tag.

HTML5 img tag, Implementation of <img> tag.

Description:

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:

Code:
ImageTag.html
<!DOCTYPE html >
<html>
<head>
<title>Title of Document</title>
</head>
<body>
<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">
</body>
</html>
Output:

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.

Related Tags for HTML5 img tag, Implementation of <img> tag.:


Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.