What are the common attribute of <img > tag?
Question :
What are the common attribute of <img > tag?
The Common Attribute of <img> Tags are:
src: to set the source of image it can be a local system path or URL
width: to set the width of image it can be a number of pixels or in percentage
height: to set the height of image it can be a number of pixels or percentage
border: to set the border of image
alt: to set the alternate text of image
title : to define the title of image which display when mouse is hover on image
hspace: to set the horizontal (left and right) space from image
vspace: to set the space (margin) from top and bottom (i.e. vertical space) in image
Example:
<img src="logo.png" width="200px" height="100px" hspace="40px" vspace="20px" alt="infomax logo" title="infomax academy"/>