Insert Image in HTML
Insert Image in HTML
<img> tag is used to insert image in HTML web page. 'src' attribute is used to set the path of image. src refers to the source. The souse of image can be a local system file or a file from internet.
Synatx:
<img src="url/path"/>
it is an empty tag.
Attribute of <img> tag:
Attribute | Description |
src | to set the source of image. it can be a URL or path of local system file |
height | to define the the height of image. It cab be in pixel or percentage |
width | to define the the width of image. It cab be in pixel or percentage |
align | to set the position and also warp the content. the possible value for align is left or right |
hspace | to set the horizontal margin (space) i.e out side of image at left and right. |
vspace | to set the vertical margin (space) . i.e out side from top and bottom of image |
title | to set the title of image which show on mouse hover of image |
alt | to set the alternate text for image |
border | to define the border of image, default color of border is same as text color of body. |