Page 126 - Viva ICSE Computer Studies 7 : E-book
P. 126
The ALT Attribute
The ALT attribute is used to defi ne an alternate text for an image. The value of this attribute is
an author-defi ned text. The ALT attribute tells the reader what he/she is missing on a page if
the browser cannot load images. The browser will then display the alternate text instead of the
image. It is a good practice to include the ALT attribute for each image on a page. This improves
the display and usefulness of your document.
Example: Illustrating to Display Alternate Text when an Image is Not Being Displayed
Using Image as Background
We can also set an image fi le as a background for a page. To perform this we use a background
attribute with a body tag.
Example: Illustrating Image as a Background
Linking Web Pages
In HTML, you can link two pages using hyperlinks. To create a hyperlink, the anchor <A> tag
is used. The HREF attribute of the anchor <A> tag is used to specify the address of the file to
which you want to link the page. For example, the following HTML code will make the text
114