
Opening tag : <BODY>
Closing tag: </BODY>
Purpose:
The Body tags contain the body of a webpage - hence they are perhaps the most important tags in HTML! Everything that appears on your webpage will be contained within these tags - the opening BODY tag should immediately follow the closing HEAD tag. Most of the attributes can be better set using CSS.
Attributes:
alink=color
- This sets the color for active links used on the page.
background=url
- If you want to set an image for the background of the page, use the background parameter to set the url of the image.
bgcolor=color
- Sets a color for the background of the webpage.
bgproperties=FIXED
- For some browsers, this will set the background image to be a watermark which won't scroll with the page.
class=class
- Format the page according to a specified class.
dir=direction
- For pages in languages where the text runs from right to left, this is a useful attribute!
event=JavaScript
- Use the event attribute initiate a Java script.
fontsize=size
- SMALL, MEDIUM or LARGE, try a different default size for the webpage.
lang=language
- Sets the language of the webpage.
leftmargin=#
- For some browsers can set a leftmargin width.
link=color
- Sets a color for links on the page that haven't been visited and aren't active
marginheight=#
- For some browsers, sets a top and bottom margin.
marginwidth=#
- For some browsers, sets a browser for the left and right margin.
vlink=color
- Sets a color for links that have been visited.
text=color
- Sets a color for text on the page.
topmargin = #
- For some browsers sets a size for the top margin.
Example:
<BODY bgcolor="#ffffff" link="#000000" background="background.jpg">
This is some text and stuff within the document
<BODY>
Related Tags:
<!-- --> - For Comments.
Back to:
Alphabetical Guide
Guide By Type