WD: HTML Document Displays Tags When Opened

ID: Q153360

The information in this article applies to:

SYMPTOMS

When you open a Hypertext Markup Language (HTML) document as HTML (select HTML Document in the Files of Type list), you see the HTML tags instead of the formatted text.

CAUSE

This problem may occur when you open an HTML document as text only, and then save the document as HTML. Because you saved the text version as HTML, Word saves all of the text you see, including the tag delimiters ("<" and ">") as part of the actual Web page.

In addition, if you now open the document as text only, you can see that Word has surrounded every paragraph with the <P> and </P> elements. This is how Word converts all the text in the Normal style when you open a document as text, and save it as HTML.

RESOLUTION

To restore your original HTML document, follow these steps:

1. Open the document in Word.

2. Select all of the text, and then click Copy on the Edit menu.

3. Create a new document based on the Normal template.

4. In the new document, click Paste on the Edit menu.

5. Save the document as Text Only, but change the file name extension to

   .htm instead of .txt. (Omit this step if you are using Word for the
   Macintosh.)

6. Close the document. When Word displays the message
 
      This document may contain formatting which will be lost upon 
      conversion to Text Only format. To Preserve the initial document, 
      click No to exit this dialog, then save the document in Word format 
      before converting.

   click Yes to save as Text Only.

7. Reopen the document.

Word converts the document to an HTML document.

Additional query words: HTML hypertext markup language

Keywords          : kbprint kbwdinternet 
Version           : MACINTOSH:6.0,6.0.1,6.0.1a,98;WINDOWS:6.0,6.0a,6.0c,7.0,7.0a,97
Platform          : MACINTOSH WINDOWS
Issue type        : kbprb

Last Reviewed: January 21, 1999