Page 65 - CA_165_V2.0_Flipbook
P. 65

<BODY BACKGROUND="C:\field_with_grass_clouds.jpg">

                 This is an example showing the use of the BACKGROUND attribute in the BODY tag.
                 </BODY>

                 </HTML>
                 The output of the preceding HTML code is as follows:























                 In the above example, we used an absolute path for the image because it is located on the C:\ drive.

                 LINK, ALINK and VLINK Attributes
                 The LINK, ALINK, and VLINK attributes are used in the <BODY> tag to change the colour of links on a
                 web page:

                   LINK: This attribute sets the color of links that have not been clicked yet.
                   ALINK: This attribute sets the color of a link while it is being clicked (active link).

                   VLINK: This attribute sets the color of links that have already been visited.
                 The syntax for using the LINK, ALINK, and VLINK attributes with <BODY> tag is as follows:

                 <BODY LINK="COLOR" ALINK="COLOR" VLINK="COLOR">
                 For example:


                 <BODY LINK="GREEN" ALINK="CRIMSON" VLINK="MAGENTA">
                         Notes

                         The LINK, ALINK, and VLINK attributes are not supported in HTML5.



                 The following HTML web page uses the LINK, ALINK, and VLINK attributes to set the color of unvisited,
                 active, and visited links:

                 <HTML>
                 <HEAD>

                     <TITLE>LINK COLOURS EXAMPLE</TITLE>
                 </HEAD>

                 <BODY LINK="GREEN" ALINK="CRIMSON" VLINK="MAGENTA">
                     LINK, ALINK, AND VLINK EXAMPLE


                                                                                         Introduction to HTML    63
   60   61   62   63   64   65   66   67   68   69   70