Text Links Ads : Marketing Tips Store : Search Engine Optimization Strategies
WebPosition Gold Pro : Domain Registration Bank : Optilink Software : GoDefy
Mike's Marketing Tools : Mike's Ecommerce Software : Text Links Guide
 
Web HTML-HTML.com
You are here: HTML Codes >> Fonts

Setting the Font of the Whole Page

In the previous examples we've set the font properties of elements such as <H2 ...> or <A ...>. Setting the properties of the entire page isn't much different... we just set the styles for the <BODY ...> element.

For example, suppose we want the entire page to use a sans-serif font. We put a style like this in the <HEAD> section:

BODY
 {
 font-family:sans-serif;
 }

which gives us the fonts on the page you're reading right now.

A popular reason to set the fonts of the entire page is to make font colors compatible with a background color. In that case we can set all the style properties in the style. For example, the following code sets the background color of the page to black, the font to white, and the font family to sans-serif. It also sets the link color to white and the visited link color to yellow.

this code produces this
<STYLE TYPE="text/css">
<!--
BODY
 {
 color:white;
 background-color:black;
 font-family:sans-serif;
 }
A:link{color:white}
A:visited{color:yellow}
-->
</STYLE>
this page

Fonts in Tables >>>

Copyright © 2002-8 Art Dacor USA LLC. All Rights Reserved.
3727 West Magnolia Blvd #489, Burbank, CA, 91505, USA.
www.HTML-HTML.com