HTML image tag is used to import the images to webpages, tag is defined as <img ...> and no need to put end tag </img>. This image tag having more attributes.
Syntax :-
Attributes:-
src - Specify the Source of the image path
image this text will display in the yellow tool tips
Syntax :-
<img src="path of the image" attributes...>
Attributes:-
src - Specify the Source of the image path
<img src="sampleimage.jpg" >
width - set the width of the image
<img src="sampleimage.jpg" width="50px">
height - set the height of the image
<img src="sampleimage.jpg" width="50px" height="50px">
alt - Give some alternative text of the image (Before load the image this text will display)
<img src="sampleimage.jpg" width="50px" height="50px" alt="Will Display sample image">
Title - Title is also specify the image title, and it will display when you drag the mouse over theimage this text will display in the yellow tool tips
<img src="sampleimage.jpg" width="50px" height="50px" alt="Will Display sample image" Title="This is the sample Image">
style - This attribute is used to give some css style to image tag.
<img src="sampleimage.jpg" style="border : red 5px solid;">
usemap - This attribute is used to assign some area for particular html file.
<img src="sampleimage.jpg" usemap="#mapname">
<map name="mapname">
<area shape="rect" coords="0,10,30,60" alt="This is the Marked place" href="file.html">
</map>
<map name="mapname">
<area shape="rect" coords="0,10,30,60" alt="This is the Marked place" href="file.html">
</map>
0 comments:
Post a Comment