HTML5 img tag, Implementation of <img> tag.


 

HTML5 img tag, Implementation of <img> tag.

Here, we will implement <img> tag.

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.

Ads