WD2000: How to Create Cascading Style Sheets in Word 2000
ID: Q235481
|
The information in this article applies to:
SUMMARY
This article describes how to create external and embedded cascading style sheets (CSS).
MORE INFORMATION
Microsoft Technical Support will not resolve problems produced by editing the HTML that Word 2000 generates. This HTML Code sample is provided as a
convenience for authors seeking to extend the capabilities of Word. For
more information about writing HTML, please see the following Microsoft Web
site: http://msdn.microsoft.com/workshop/author/default.asp
WARNING: ANY USE BY YOU OF THE HTML PROVIDED IN THIS ARTICLE IS AT YOUR OWN
RISK. Microsoft provides this HTML "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.
NOTES
- To use the full functionality of cascading style sheets, you need a
browser that can support them, such as Microsoft Internet Explorer 4.0 or later.
- Some browsers only support certain aspects of cascading style sheets.
- Your results may differ, depending on the browser you are using.
- Do not use themes for this demonstration, or the examples will not work properly.
External Style Sheets
To create an external style sheet, follow these steps:
- In Word, create a new Web Page (on the File menu, click New, click Web Page, and then click OK). Name it "Style" (without the quotation marks).
- On the View menu, click Web Layout.
- On the File menu, click New, click Blank Document, and then click OK.
Word creates a new blank page to record your style sheet.
- Type the following:
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: black
}
- On the File menu, click Save As. Select the location where you want to save. In the File Name box, type MyStyles.css.
- Under Save as type, click Text Only, and click OK.
To Link Your Style Sheet to a Word Document:- Create a new Web page in Word. (On the File menu, click New, and then click Web Page.)
- On the View menu, click HTML Source.
- Add the following to your Web page, within the "HEAD" tag:
<HEAD>
<TITLE>Title of article</TITLE>
<LINK REL=STYLESHEET
HREF="http://internet-name/MyStyles.css"
TYPE="text/css">
</HEAD>
- On the File menu, click Exit. Answer Yes when prompted to save changes.
Embedded Style Sheets
To create an embedded style sheet, follow these steps:
- In Web Layout view, create a new Web page.
- On the Format menu, click Style.
- In the List box, click All styles.
- In the Styles list, select HTML Preformatted and click Modify.
- In the Modify Style dialog box, click Format, and then click Font.
- Format the font and click OK. For example, click Italic under Font style and click OK.
NOTE: Click to select Add to template if you want this style sheet to be available for every document.
- Click OK again, and then click Apply.
- If everyone in your viewing audience uses a browser that supports cascading style sheets, you need to select the Rely on CSS for font formatting check box. To select this, follow these steps:
- On the Tools menu, click Options, and then click the General tab.
- Click Web Options, and then click the General tab.
- Select the Rely on CSS for font formatting check box.
NOTE: To use this style sheet later, in the Styles list, select HTML Preformatted.
For additional information about cascading style sheets, click the article number below
to view the article in the Microsoft Knowledge Base:
Q235479 WD2000: What Are Cascading Style Sheets?
Additional query words:
Keywords : kbdta wd2000
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbinfo
|