|
Helping ordinary people create extraordinary websites! |
Cascading Style Sheets - CSSBy Neil Williams2007-11-08
Using CSS to avoid tags deprecated in HTML4 You've already seen how to alter the <BODY> tag to include details normally declared in the HTML. This is included in the CSS file because HTML4 dictates that the normal text= and bgcolor= attributes are "deprecated" - not needed and likely to be unsupported in future releases of HTML. There are other BODY attributes that are deprecated, the alink=, link= and vlink= attributes. These cannot be amended by the CSS BODY selector - you need to use a pseudo-class to include these in CSS a:link{color:red;background-color:white;}
Equivalent to the attributes: link=red vlink=green alink=black in the normal BODY tag. Remember, for files shared with non-CSS capable browsers, you may need to include the deprecated <BODY> attributes temporarily. Don't neglect the text-justification and font selection of the main BODY selector - these will add to the presentation of the site in those browsers that support CSS but will cause no problems in non-CSS browsers, so go ahead and include them in all your HTML. Tutorial Pages: » The HTML4 way to control HTML output » Introduction to style sheets » Style classes, ID's and altered HTML tags » Using CSS to avoid tags deprecated in HTML4 » Your complete CSS1 + CSS2 reference Copyright © Neil Williams |
|