How to use cascading style sheets to change the appearance of text in Internet Explorer (832538)



The information in this article applies to:

  • Microsoft Internet Explorer 6.0
  • Microsoft Internet Explorer 5.5
  • Microsoft Internet Explorer 5.01
  • Microsoft Internet Explorer 5.0

SUMMARY

This article describes how to use cascading style sheets (*.css) to change the color and font of pages in the Microsoft Internet Explorer window.

MORE INFORMATION

You can use a cascading style sheet to change the color scheme, font size and font color that Internet Explorer use. With cascading style sheets, you can specify the formatting of common HTML pages elements such as heading tags, paragraph tags, and hyperlink anchors. To create a custom cascading style sheet, follow these steps:
  1. Click Start, point to All Programs, point to Accessories, and then click Notepad.
  2. Add the following text to the file:
    body
    {
    background-color: white
    }
    h1 
    {
    font-size: 12pt;
    font-family: "Arial";
    color: black
    }
    
    p  
    {
    font-size: 10pt;
    font-family: "Times New Roman";
    color: black
    }
    
    a 
    {
    text-decoration: none;
    font-weight: bold;
    color: blue
    }
    
  3. Save the file with the name Testcss.css
  4. Exit Notepad.
This sample style sheet formats <H1></H1> heading tags with black, 12-point Arial font, <P></P> paragraph tags with black, 10-point Times New Roman font, and <A></A> anchor tags with the parent font, and bold, blue text.

After you create a style sheet, you can apply it to Internet Explorer. As a result, the appearance of Web pages that do not already use a style sheet changes. To apply a style sheet to Internet Explorer, follow these steps:

Note Some Web pages may be difficult to read after you apply the style sheet setting to Internet Explorer.
  1. Start Internet Explorer.
  2. On the Tools menu, click Internet Options.
  3. On the General tab, click Accessibility.
  4. Click to select the Format documents using my style sheet check box.
  5. Click Browse, locate the *.css file that you want to use, and then click Open.
  6. Click OK two times.
For more information about how to create and use custom cascading style sheets, visit the following Microsoft Web sites:

Modification Type:MinorLast Reviewed:12/3/2004
Keywords:CSS KB832538 kbAudEndUser