How to Convert a Word Table to HTML
Microsoft Word is a word processing program with many functions, including the ability to place information in tables. The tables can have multiple rows and columns, as defined by the user. Microsoft Word also has the ability to save its documents in HTML format. Any tables in a Word document are then converted to HTML tables.
Things You'll Need
- Microsoft Word
- Web browser
Convert the Word Document to HTML
Open the Microsoft Word program, and open the document that contains the table you want to convert.
Click the Office menu (Word 2007) and click "Save As," then "Other Format," and choose "Web Page." In all other versions of Word, click the File menu and select "Save As," then choose "Web Page/HTML" as the file format. Some versions of Word have a "Save As Web Page" command under the File menu, which will work as well.
Give the file a new name and click "Save." The saved file will have the extension .HTM.
Quit the Word program.
View the HTML Code
Open a web browser application and open the HTML file using the File menu's "Open File" command. Alternatively, you could right-click the file on the desktop and choose "Open With..." from the pop-up menu to select your browser application.
Click the View menu (Firefox and Safari) and the "Page Source" (or "View Source") command to view the HTML code Word created. In Internet Explorer, the command to view page source is under the Page menu on the far right.
Scroll down the HTML window and look for a
Tips & Warnings
- Microsoft Word HTML code is very cluttered. After you convert the document to HTML, you might want to open it with a web editing tool such as Adobe Dreamweaver to remove the redundant and unnecessary information in the HTML tags. Dreamweaver has a "Clean Up Word HTML" command under its Command menu.