Attributes of BODY tag
ATTRIBUTES OF BODY TAG
The main attributes of <body> tag are: Bgcolor, text, link, alink, vlink, background, leftmargin, topmargin, rightmargin, bottommargin.
BGCOLOR ATTRIBUTE
This attribute is used to set the
background colour of the HTML document. The default colour for bgcolor is
white, this means that if no bgcolor is set then the document will display
white background.
Syntax : <BODY
bgcolor=colour name or colour code>
Ex : <BODY
bgcolor=blue>
TEXT ATTRIBUTE
This attribute is used to set the
colour of the text written or displayed in the document. The default colour for
body text is black which means that if the attribute value is not set, then the
text on the page will appear in the black colour.
Syntax : <BODY
text=colour name or colour code>
Ex : <BODY text=pink>
EXAMPLE
<html>
<head>
<title> checking bgcolor and text attribute</title>
</head>
<body bgcolor=pink text=blue>
Hello!! Guys we are just studying about HTML. It is so easy and interesting language. Have fun!!
</body>
</html>
<head>
<title> checking bgcolor and text attribute</title>
</head>
<body bgcolor=pink text=blue>
Hello!! Guys we are just studying about HTML. It is so easy and interesting language. Have fun!!
</body>
</html>
COLOURS AND COLOUR CODES
The colour codes are nothing but
their RGB (Red, Green, Blue) values. A six digit format is used where two
digit, each is for a color, in sequence as hexadecimal values range from 00 to
FF.
COLOUR NAME AND HEXADECIMAL RGB CODES
1) Aqua : 00FFFF
2) Black : 000000
3) Blue : 0000FF
4) Grey : 808080
5) Green : 008000
6) Lime : 00FF00
7) Maroon : 800000
8) Olive : 808000
9) Purple : 800080
10)Red : FF0000
11)Silver : C0C0C0
12)White : FFFFFF
13)Yellow : FFFF00
LINK ATTRIBUTE
Link attribute is used to set the colour of the text link on the page.
Syntax : <BODY
link=colour name or colour code>
Ex : <BODY
link=green>
Link attribute is used to set the colour of the text link on the page.
VLINK ATTRIBUTE
This attribute is used to set the colour of the visited link on the page.
Syntax : <BODY Vlink=colour
name or colour code>
Ex : <BODY Vlink=maroon>
This attribute is used to set the colour of the visited link on the page.
This attribute is used to set the colour of the active link on the page.
<BODY bgcolor=grey text=red link=green alink=yellow vlink=maroon>
<html>
<head>
<title> checking link colour attribute</title>
</head>
<body bgcolor=pink text=blue vlink=purple alink=yellow>
Hello!! Guys we are just studying about HTML. It is so easy and interesting language. Have fun!!
<br>
<A href= "https://studyseaff.blogspot.com> "> click on link </A>
</body>
</html>


nice
ReplyDelete👍
ReplyDelete