Microsoft KB Archive/220446

= WD2000: HTML: Arbitrary Attributes (WIDTH and HEIGHT) Ignored/Lost in Word =

Article ID: 220446

Article Last Modified on 10/28/2002

-

APPLIES TO


 * Microsoft Word 2000 Standard Edition

-



This article was previously published under Q220446



SYMPTOMS
After you use the WIDTH and HEIGHT attributes in your HTML code, your Web page may appear correctly in a Web browser. However, when you open the Web page in Microsoft Word, the WIDTH and HEIGHT attributes are ignored and do not appear as you intended.

Also, after you save the Web page in Word and redisplay the page in your Web browser, your Web page may appear the same as it did in Word. In other words, the width and height of your image are not retained as you intended.

For example, your Web page containing the following HTML code:

Microsoft

appears as the following in a Web browser:

Microsoft

When you open the Web page in Word 2000, the page appears as in the following example:

Microsoft

NOTE: After you save the Web page in Word and reopen the Web page in your Web browser, the page appears the same as it did in Word. 

CAUSE
This functionality is by design, because Word does not support or retain arbitrary attributes such as WIDTH and HEIGHT to override the default behavior of HTML elements (user agents or tags).



MORE INFORMATION
The WIDTH and HEIGHT attributes can be used in a Web page to override the default behavior (interpretation) of user agents in favor of the specified values. When these attributes are used in this manner, the attributes are referred to as arbitrary.

When the object is an image, it is scaled. User agents are designed to scale an object or image as nearly as possible to match the width and height specified by the author. Note that lengths expressed as percentages are based on the horizontal or vertical space currently available, not on the natural size of the image, object, or applet.

The WIDTH and HEIGHT attributes give user agents information about the size of an image or object so that the user agents may reserve space for the object or image and continue rendering the document while waiting for the image data.

