body element
Unlike the head element, any plain text placed between the <body> tags will be displayed on the web page by the browser.
What not to do
Many old textbooks have examples such as:
<body text='black' link='red' alink='pink' vlink='blue' bgcolor='#DDDDDD' background='wallpaper.gif'>
...
</body>
The text, link, alink, vlink, bgcolor and background attributes have all been deprecated in HTML 4. This means that they should not be used in new documents. They have been superseded by the CSS rules given below (using these rules is discussed in a later section HTML Programming/CSS). The values from the previous example have been used as examples in these rules.
text
body { color:black }
bgcolor
body { background-color:#DDDDDD }
background
body { background-image: url(wallpaper.gif) }
link
a:link { color:red }
alink
a:active { color:pink } (an active link is a link that is being clicked or has the keyboard focus)
vlink
a:visited { color:blue }
hover (not an html attribute)
a:hover { color:green } ('hover' is the style of a link when the mouse pointer is over it)
If you find a textbook that uses any deprecated attributes or elements (except to explain why you shouldn't use them) it is out of date. You would be well advised to ignore it and get a new textbook.
All text is available under the terms of the GNU Free Documentation License
Source : Wikibooks
|