Page 124 - iPlus_Ver_2.0_class_7
P. 124
<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="50%"
HEIGHT="50%"
ALIGN="right"
BORDER="2">
</BODY>
</HTML>
Ensure that an image that we want to insert on the web page is 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
on the D: drive of a computer, then the path of the image will be D:\lily.jpg.
Info Byte
Some of the image formats supported by HTML are Joint Photographic Experts Group
(JPEG), Graphics Interchange Format (GIF), and Portable Network Graphics (PNG).
i + CREATING MARQUEE
While surfing the Internet, you might have seen moving advertisements in the form of text or
images. The moving objects get special attention from the user. HTML allows you to move your
objects left, right, up, and down by using the <MARQUEE> tag.
The <MARQUEE> tag is a container tag. It takes the text or image between the opening
<MARQUEE> and the closing </MARQUEE> tags.
<MARQUEE> Hello! I am a moving text </MARQUEE>
Similarly, the image can also be added to this moving part or section.
<MARQUEE> <IMG SRC="D:\smiley.gif"> </MARQUEE>
122
iPlus (Ver. 2.0)-VII

