Page 28 - PlusGPT_V2.1_C7_Flipbook
P. 28
HEIGHT: It specifies the height of the image in the web page. For example,
<IMG SRC="lily.jpg" HEIGHT="60%">
ALIGN: It aligns the image with respect to the text placed adjacent to the image. Image can be
aligned left, right, middle, bottom and top. For example,
<IMG SRC="lily.jpg" ALIGN="right">
BORDER: It specifies the thickness of the border surrounding the image.
<IMG SRC="lily.jpg" BORDER="2">
ALT: It specifies the alternate text to be displayed in the web browser, if the provided image is not
found. For example,
<IMG SRC="lily.jpg" ALT="Describing the flower">
Let us use the <IMG> tag to insert an image on the web page in the following way:
<HTML>
<HEAD> <TITLE> Inserting Image </TITLE>
</HEAD>
<BODY>
<B> Inserting image on the web page </B>
<IMG SRC="lily.jpg"
WIDTH="200px"
HEIGHT="200px"
ALIGN="right"
BORDER="2">
</BODY>
</HTML>
Image inserted with border
Ensure that an image which we want to insert on the web page should be saved at the same location
where we have saved our HTML file. If we want to insert an image from any other location, we need to
provide the complete path of the image to the SRC attribute. For example, if our image is saved in the
D: drive of computer then the path of the image will be D:\lily.jpg.
26 Premium Edition-VII

