Web Hosting Directory | Web Hosting Resources | Webmaster Resources | Domain Tools | Search Engine Marketing | Forums
  Signup
Today: 27   Yesterday: 1,557   Max: 1,872   Total: 377,302   Current Users : 14 (Member 0) 
HTML RESOURCES

WEBMASTER RESOURCES

WEBMASTER TOOLS

JAVASCRIPT RESOURCES

PHP RESOURCES

MISCELLANEOUT RESOURCES

 

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



Copyright 1997-2002 Idocs, Inc. Written by Miko Sullivan.

 
 
What is your major source of website traffic?
 
 
 
 
 
 

ADVERTISEMENT

 
Cheap Web HostingBudget Web HostingEcommerce Web Hosting
Link to UsLink ExchangeAdvertisePrivacy PolicyTerms Of ServiceAbout UsContact UsSitemap
Copyright © 2006 - 2008 Broadband Media, Inc. All rights reserved.