WD97: HTML Tags Nested Incorrectly After Saving Word 97 File

Last reviewed: March 6, 1998
Article ID: Q167255
The information in this article applies to:
  • Microsoft Word 97 for Windows

SYMPTOMS

When you look at your HyperText Markup Language (HTML) document in a Web browser, the HTML document appears to be formatted incorrectly. For example, all of the text appears to be formatted with the same font formatting.

Note: This problem may not be evident in all Web browsers.

CAUSE

When you save a Word 97 document in HTML format, Word may incorrectly nest the HTML markup if one paragraph ends with the same text formatting as the subsequent paragraph. Although some browsers will ignore the nesting error, other browsers may not be able to interpret and display the HTML markup correctly.

WORKAROUND

To work around this problem, open the HTML document in a text editor, such as Notepad, and correct the nesting order of the HTML code.

NOTE: If you modify the document using Word 97, and then save your changes, Word will save the HTML code incorrectly. To correct the problem you will need to re-edit the document in a text editor.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

To correctly nest tags in HTML, the last tag that you open is the first tag that you close.

The following is an example of how Word 97 incorrectly nests the HTML code. Notice that the bold (</B>) end tag appears in the second paragraph (<P>) element after the text, "Verse 1":

   <B><I><U><FONT FACE="Arial">
   <P ALIGN="JUSTIFY">Test Pattern</P>
   </I></U></FONT>
   <FONT FACE="Arial" SIZE=2>
   <P ALIGN="JUSTIFY"><A NAME="C"></A>Verse 1</B>: The quick brown
   fox jumped over the lazy dog's back.
   <B>Verse 2</B>: The quick brown fox jumped over the lazy dog's
   back.</P></FONT>

To correct this sample markup, move the bold (<B>) open tag in front of the text, "Verse 1":

   <I><U><FONT FACE="Arial">
   <P ALIGN="JUSTIFY"><B>Test Pattern</B></P>
   </FONT></U></I>
   <FONT FACE="Arial" SIZE=2>
   <P ALIGN="JUSTIFY"><A NAME="C"></A><B>Verse 1</B>: The quick brown
   fox jumped over the lazy dog's back.
   <B>Verse 2</B>: The quick brown fox jumped over the lazy dog's
   back.</P></FONT>

For additional information, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q157086
   TITLE     : WD97: Limitations of Converting from Word Format to HTML


Additional query words: 97 8.0 communicator navigator display wrong
Keywords : kbhtml
Version : 97
Platform : WINDOWS
Hardware : x86
Issue type : kbprb


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: March 6, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.