Friday 3 June 2011

Body Tag Attributes

Explain the attributes of body tag with example.



The largest part of your HTML document is the body, which contains the content of your document (displayed within the text area of your browser window).  All HTML tags that pertain to the body of your HTML document must be places between the open <BODY> tag and the closed </BODY> tag. The tag has attributes which you can use to set the colors of your background, text, links, and also to include your own background image. They are as follows:

BGCOLOR=”white” Sets the background color (other color names: red, black, blue etc)

TEXT=”black”             Sets the body text color


LINK=”blue”                Sets the unvisited hypertext links

VLINK =”purple”         Sets the visited hypertext links

ALINK=”red”   Sets the active hypertext links (the color of the hypertext link when you have your mouse button depressed)

BACKGROUND        Let you use an image as the background

Body attributes are used as part of the open <body> tag. For example:

<BODY BGCOLOR = "white" TEXT = "black" LINK = "blue" VLINK = "purple" ALINK = "red" BACKGROUND=”c:\clouds.jpg

No comments:

Post a Comment