Page 120 - CA_165_V2.0_Flipbook
P. 120
<IMG SRC = "Dolphin.JPG" HPACE = 50 VSPACE =45 ALT = "Dolphins in sea" BORDER
=3 WIDTH = 300 HEIGHT = 300>
</BODY>
</HTML>
The output of the preceding HTML code is as follows:
The following table lists all the attributes of the <IMG> tag, their possible values, and a description of
their purpose:
Attribute Name Value Description
SRC URL of the image Specifies the path to the image file.
ALIGN left, right, top, bottom, middle Specifies the alignment of the image relative to
surrounding text or elements.
Not supported in HTML5
BORDER Numeric value Specifies the width of the border around the
image in pixels.
Not supported in HTML5
WIDTH Numeric value (in pixels or %) Specifies the width of the image.
HEIGHT Numeric value (in pixels or %) Specifies the height of the image.
HSPACE Numeric value Specifies the horizontal space (in pixels) between
the image and surrounding elements.
Not supported in HTML5
VSPACE Numeric value Specifies the vertical space (in pixels) between
the image and surrounding elements.
Not supported in HTML5
ALT Text Specifies alternative text to display if the image
cannot be loaded. Helps with accessibility.
118 Touchpad Computer Applications-X

