Microsoft Word has various paragraph spacing options that can be saved to HTML and displayed in the browser. Users can also specify Web-like Auto spacing for paragraphs. It is important to note that paragraph spacing might be displayed differently depending on the browser or browser version used.
Because browsers ignore empty P elements, Word inserts a nonbreaking space ( ) between these elements when saving to HTML. On import, Word ignores empty P elements.
In Word, users can specify the spacing before and after a paragraph. When saving to HTML, Word uses the P element's style attribute to display and store these settings.
Word 2000 has a before and after paragraph setting for spacing called Auto. Word uses paragraph Auto spacing to emulate browser display of non-specified paragraph spacing. When Word opens an HTML file that was not created with Office programs, paragraphs that do not have before or after paragraph spacing specified are typically assigned Auto paragraph spacing. Word saves this setting to HTML using the mso-margin-top-alt and mso-margin-bottom-alt style attributes.
Auto spacing in Word displays a standard amount of spacing before and after paragraphs, usually about 14 points for a 12-point font size, similar to browsers. Word also applies spacing differently depending on the context of the paragraph as browsers do. The following table shows the actual spacing applied to paragraphs in specific document contexts when Auto is set for before and after spacing.
|Type of paragraph||Auto spacing displayed|
|First paragraph in a document||No spacing before|
|First paragraph in a table cell||No spacing before|
|Last paragraph in a table cell||No spacing after|
|List item paragraph before another list item||No spacing after|
|List item paragraph after another list item||No spacing before|
|Other paragraphs||Space before and space after|
Word might not always display Auto spacing in the same way that a specific browser does. This feature primarily provides a way for Word to display undefined paragraph spacing in a manner similar to most browsers.
For information about the style attributes that Office uses and their possible values, see the Style Attributes topic.