• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Lesson 12. Editing the Code > Working with Microsoft Word HTML

Working with Microsoft Word HTML

You may get content for your pages from a variety of sources. Clients or colleagues might send the content in a Microsoft Word file. If the format of the Word document is fairly simple, you can use the copy-and-paste method to import your text into Dreamweaver. If the Word document has formatting such as bullets or tables, you may want to save the document as a Web page (choose File > Save As Web Page in Word 97 or later) and open the resulting HTML file in Dreamweaver. Word inserts a great number of unnecessary tags, however. You can clean up this code in Dreamweaver in one step. The tags that Dreamweaver removes are required to display the page in Word but are not needed in HTML or a browser.

Create a new basic HTML document. Choose File > Import > Import Word HTML.

The Select Word HTML File to Import dialog box opens.


You must have a Dreamweaver document open in order to access the Import options.

Select the markings.html file from Lesson_12_Code/Text and click Open.

This HTML file was saved from a Word 2001 document. Dreamweaver opens the file in a new document window and automatically opens the Clean Up Word HTML dialog box.

Dreamweaver attempts to determine what version of Word was used to create the HTML. If Dreamweaver is unable to determine the version, you need to choose the correct version from the drop-down menu. For this exercise, choose Word 2000/2002.

The dialog box has two tabs, Basic and Detailed, with several options to check for each. For this exercise, you should use the default setting (all options checked).

The options on the Basic tab are as follows:

  • Remove all Word specific markup

  • Clean up CSS

  • Clean up <font> tags

  • Fix Invalidly nested tags

  • Set background color

  • Apply source formatting

  • Show log on completion

The Detailed tab contains additional options to remove all word specific markup and clean up CSS.

Click OK. Click OK again to close the dialog box after reviewing the changes made. Save the file as markings.html in the Lesson_12_Code folder.

Dreamweaver displays a dialog box listing all the changes that it made.


You can also open the Clean Up Word HTML dialog box by choosing Commands > Clean Up Word HTML.



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint