Images can be placed in a web page by using <IMG> tag. It is an empty tag (only start tag, no end tag).
It is written as:
<IMG SRC="image_URL">
The SRC attribute is mandatory for the <IMG> tag. Other attributes used with <IMG> are:
ALIGN: It used to set the alignment of the text adjacent to the image. It takes the following values:
By default, the text is aligned with the bottom of the image.
HEIGHT and WIDTH: Height and Width of an image can be controlled by using the HEIGHT and WIDTH attributes.
ALT (Alternative Text): This attribute is used to give alternative text that can be displayed in place of the image. This is required when the user needs to stop display of images while retrieving a document in order to make the retrieval faster, or when the browser does not support graphics. It is also used a tool tips - displaying description of the image when the mouse is over the image.
BORDER
Border around the image can be controlled by using BORDER attribute of <IMG> tag. By default, image displays a thin border. To change the thickness or turn the border off, the value in pixels should set to BORDER attribute.
Example:
<IMG SRC="example.png" BORDER="5" ALT="Example Image" ALIGN="left">