Page 88 - CA 165 ver 1.0 Class 10
P. 88
For example:
<IMG SRC = “C:\dolphin.JPG”>
ALIGN Attribute
This attribute is used to align the text and images according to the specified position on the displayed
page.
Text Alignment
ALIGN= “TOP” : It aligns the text to be displayed at the top, above the image.
ALIGN= “MIDDLE” : It aligns the text to be displayed in the middle, near the image.
ALIGN= “BOTTOM” : It aligns the text to be displayed at the bottom, below the image.
Image Alignment
ALIGN= “LEFT” : It aligns the image towards the left of the screen.
ALIGN= “RIGHT” : It aligns the image towards the right of the screen.
Syntax to use the ALIGN attribute of the <IMG> tag is as follows:
<IMG ALIGN = “TOP/MIDDLE/BOTTOM/LEFT/RIGHT”>
For example:
<IMG SRC= “C:\dolphin.JPG” ALIGN= “MIDDLE”>
<IMG SRC= “C:\dolphin.JPG” ALIGN= “RIGHT”>
Image of ‘dolphin’ inserted
due to ‘IMG SRC’
BORDER Attribute
This attribute is used to specify the width of the border around the image. By default border is not set in
the page. Syntax to use the BORDER attribute of the <IMG> tag is as follows:
<IMG BORDER = “Value”>
For example:
<IMG SRC=“C:\dolphin.JPG” BORDER=“2”>
WIDTH Attribute
This attribute is used to specify the width of the image in pixels or percentage, in comparison to its
original size.
<IMG WIDTH = “Value/Percentage”>
86 Touchpad Computer Applications-X

