BGCOLOR
This attribute sets the background color of the web page. For example, to set the background color of the web page to blue, one has to type <BODY BGCOLOR = “BLUE”>
BACKGROUND
This attribute sets the picture to be used as a background for the page. If the picture is stored in the same directory as that of HTML document, then only the name of the picture has to be typed. In the other case, the full path of the picture has to be typed. For e.g.
| Case 1 - For a picture in the same directory: |
<BODY BACKGROUND = “nature. jpg”>
|
| Case 2 - For a picture in another directory:
|
<BODY BACKGROUND = “c:\abc\nature.jpg”> |
TEXT
This attribute sets the color of the text on the page. To set the color of the text to blue, the syntax is:
Syntax: |
| <BODY TEXT = “BLUE”> |
| |
TOPMARGIN
This attribute sets the size of the top and bottom margins. It accepts an integer value. To set the top and bottom margins to 1, the syntax is:
Syntax: |
| <BODY TOPMARGIN = 1> |
| |
LEFTMARGIN
This attribute sets the size of the left and right margins. It accepts an integer value. To set the left and right margin to 1, the syntax is:
Syntax: |
| <BODY LEFTMARGIN = 1> |
| |
COMMENTS
There can be notes left for viewing in an HTML document. These notes are not visible in the web browser. To do this the Comment tag is used. The comment tag is a single tag, which means that this tag does not end. The comment is started with an exclamation mark. Exclamation mark is put after the opening bracket but not before the closing bracket. For e.g.
| <!----Hello, This is a Comment----> |
| Example with a Background Color-- |
<html> |
|
<head> |
<title> My bag of jokes </title> |
</head> |
|
<body bgcolor = “#CCFFCC” text = “blue” topmargin = 1 leftmargin = 1 > |
|
<!----I am starting off with my web site----> |
|
Hello, this is My Jokes website. Here you can read some rib-tickling jokes. These jokes are meant for people of all ages. Some of them are good, and will have you in splits. |
|
</body> |
</html> |
|
This is how this web page looks:
|