BODY ELEMENT ATTRIBUTES
Attribute | background |
Use | It is used to specify the path and filename of an image that has to be used as the background of the document. If the referenced image is smaller than the browser window, it will be tiled to fit and will scroll with the text on the page. The filename extension has to be specified along with the filename. |
Syntax | BACKGROUND= "path/filename.jpg" |
Attribute | BGCOLOR |
Use | It sets the background colour of the web page. Most of the browsers recognize the popular colour names like RED, GREEN, YELLOW, GREY, AQUA ETC. If we want to specify a colour which does not have a specific name but we know its RRGGBB composition, then we can specify this RRGGBB composition in the BGCOLOR attribute to get the background color. instead of writing BGCOLOR = "GREY", we could have written BGCOLOR = "#999999" and would have got the same effect. If a background image is also present, the BGCOLOR specified shines through regions where the background image is transparent. |
Syntax | BGCOLOR= "colorname" OR BGCOLOR= "#rrggbb" |
Attribute | Text |
Use | It sets the colour of the normal text in the document. Colour values can be given in the same way as that of the BGCOLOR attribute. The default is black (hexadecimal code #000000). |
Syntax | TEXT = "colorname" OR TEXT = "#rrggbb" |
Attribute | Link |
Use | This sets the colour of all of the non-visited links on the page. We can set this to any color of our choice. The default setting for a non-visited link is usually blue. |
Syntax | Link="colorname" OR LINK = "#rrggbb" |
Attribute | Alink |
Use | This sets the colour of active links on the page. An active link is a link that has just been keypressed by the user. Here 'keypressed' does not mean 'clicked'. 'Keypressed' means that the mouse has been taken over the link and the left mouse button is pressed but not released. 'Clicked' means the button has been pressed and then released so that the browser opens the corresponding link. We can set active link colour to any colour. The default Alink colour is red. |
Syntax | Alink="colorname" OR ALINK = "#rrggbb" |
Attribute | Vlink |
Use | This changes the colour of a visited link on the page. We can set this to any color. The default setting for a visited link is usually violet. |
Syntax | Vlink="colorname" OR VLINK = "#rrggbb" |
No comments:
Post a Comment