Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


View products that this article applies to.

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.

↑ Back to the top


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:

↑ Back to the top


Keywords: KB832538, css

↑ Back to the top

Article Info
Article ID : 832538
Revision : 6
Created on : 10/26/2007
Published on : 10/26/2007
Exists online : False
Views : 395