The image is added in HTML with the help of <IMG> tag which allows us to display the image in an HTML document. The <img> does not have a closing tag and is therefore an empty element.
Syntax:
<img src “location” align “alignment” border height width alt>
Src attribute :The src attribute is used to specify the location of url of the image to be displayed in document.Once the url has been specified in the image the location should not be changed.
Image formats are:
Jpeg,gif and png
Height:This is used to define height of image.
Width:This is used to define width of image.
Align: This is used to tell the alignment of image.
Border:This tells how much border to be given to image.
Comments