microsoft.com Home   All Products  |   Support  |   Search  |   microsoft.com Home  
Microsoft

Microsoft Typography | ...on the Web | ...embedding | ...WEFT 2 | Specifying fonts next


Specifying fonts in Web pages


Once you've decided which fonts to use you can create pages, or specify fonts within existing pages, using your preferred tools. Two methods of specifying fonts are described below.


The FONT FACE tag

The FONT FACE tag is an extension to HTML supported by Internet Explorer and recent versions Netscape Navigator. An example of the type of code you could add to your pages is shown below. See our Specifying fonts in Web pages section for more examples

<FONT FACE="Verdana, Arial, Helvetica"> 
  Some text
</FONT>


Specifying fonts using Cascading Style Sheets (CSS)

CSS provides the designer with various ways of specifying style for a Web page. Style information can be stored in an external file and referenced by any number of Web pages, or the attributes can be applied to a specific section of text within the body of a page. The method described below involves including style information within a STYLE section in the HEAD part of a particular HTML file. A simple example is shown below.

<HTML>
<HEAD>
  <TITLE>Style Sheet Demo</TITLE>
   <STYLE TYPE="text/css">
    BODY { background: black }
      H1 { color: yellow;
           font-weight: bold;
           font-size: 12pt;
           font-family: Arial, sans-serif }
       P { color: white;
           font-size: 10pt;
           font-family: Georgia, serif }
  </STYLE> 
</HEAD>
<BODY>	
  <H1>Cascading Style Sheets</H1> 
  <P>Designing simple style sheets 
     is easy. One only needs to know a 
     little HTML and some basic desktop 
     publishing terminology.
</BODY>	
</HTML>

See our Specifying fonts in Web pages section for more examples


Precautions

Microsoft WEFT uses Microsoft Internet Explorer to analyze the font usage of your pages. For this reason it's important to test your pages using Internet Explorer.



this page was last updated 16 February 2000
© 2000 Microsoft Corporation. All rights reserved. Legal Notices.
please e-mail comments to us via the e-mail address listed here.

 

Microsoft Typography | ...on the Web | ...embedding | ...WEFT 2 | Specifying fonts next