Web Development HTML Guide - Learn HTML
Developer Tutorials
ASP
CGI & Perl
CSS
Flash
HTML
Java
JavaScript
Linux
MySQL
PHP
Photoshop
Python
Wireless
XML



Developer Manuals
Learn HTML
Learn PHP
Learn MySQL
Learn CSS
Learn Pear


Developer Scripts
ASP Scripts
ASP.NET Scripts
CGI & Perl Scripts
Flash Scripts
Java Scripts
JavaScript Scripts
PHP Scripts
Python Scripts
Remotely Hosted Scripts
Tools & Utilities Scripts
XML Scripts

Developer Resources
Developer Tools
Developer News
Developer Forums
Developer Content
Developer Book Reviews
Survey Software

Web Hosting Directory
Budget Web Hosting
ColdFusion Hosting
Dedicated Servers
Domain Hosting
E-Commerce Hosting
Email Hosting
Free Web Hosting
Linux Web Hosting
Managed Hosting
Reseller Hosting
Small Business Hosting
Windows Web Hosting

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 Idocs, Inc. Written by Miko Sullivan











About the NetVisits, Inc Network | Advertise
Developer Tutorials hosted by HostGator.
Copyright ©2007 NetVisits, Inc Network. All Rights Reserved. Privacy Policy.
Visit other NetVisits, Inc. sites: