Microsoft KB Archive/235481

= WD2000: How to Create Cascading Style Sheets in Word 2000 =

Article ID: 235481

Article Last Modified on 6/17/2005

-

APPLIES TO


 * Microsoft Word 2000 Standard Edition

-



This article was previously published under Q235481





SUMMARY
This article describes how to create external and embedded cascading style sheets (CSS).



MORE INFORMATION
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.

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.</li></ol>

To Link Your Style Sheet to a Word Document: <ol> Create a new Web page in Word. (On the File menu, click New, and then click Web Page.)</li> On the View menu, click HTML Source.</li>  Add the following to your Web page, within the "HEAD" tag: <HEAD> <TITLE>Title of article</TITLE> <WWLINK REL=STYLESHEET HREF="http://internet-name/MyStyles.css" TYPE="text/css"> </HEAD> </li> On the File menu, click Exit. Answer Yes when prompted to save changes.</li></ol>

Embedded Style Sheets
To create an embedded style sheet, follow these steps: <ol> In Web Layout view, create a new Web page.</li> On the Format menu, click Style.</li> In the List box, click All styles.</li> In the Styles list, select HTML Preformatted and click Modify.</li> In the Modify Style dialog box, click Format, and then click Font.</li> 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.</li> Click OK again, and then click Apply.</li> 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:

<ol style="list-style-type: lower-alpha;"> On the Tools menu, click Options, and then click the General tab.</li> Click Web Options, and then click the General tab.</li> Select the Rely on CSS for font formatting check box.</li></ol> </li></ol>

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:

235479 WD2000: What Are Cascading Style Sheets?

Keywords: kbinfo KB235481

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.