Converting Word Documents to HTML
From time to time it may be neccessary to convert parts or even whole Word documents to html before uploading them to your website.
This article does not consider the postitive aspects of converting documents for your website such as getting good content onto your site for ranking or the negative aspects such as giving away your content which you may have otherwise exchanged for an e-mail address.
There are some quick and easy ways to do the conversion.
1) Using Word to Save As html
2) Using GMail
3) Using a Text Editor (html editor)
1) Using Word to Save As html
- Open the document in Word.
- If the default style is Normal then change it to Normal (Web).
- Use the Format menu and the Styles and Formatting sub menu to acheive this.
- Now Save As and below the filename change the 'Save as type' to Web Page.
- Go to the file and double click it and it will open in a browser.
- Check the content and if you are happy upload to website.
2) Using GMail
- Make sure you have a Gmail account.
- If not, go to Google and at the top left of the page select Google Mail and follow the instructions.
- Send the Word document, as an attachment, to your Gmail account.
- Sign in to Gmail and view the email with the attachment.
- Click the 'View as HTML' link at the bottom of the email.
- With the page opened, 'View source' from your browser.
Copy the code from the source view.
There is a full description of viewing attachements in gmail at the following link: http://mail.google.com/support/bin/answer.py?answer=30719
3) Using a Text Editor (html editor)
If neither of the above solutions work for you then try this one.
Take your document and save it as text.
Lets consider what we usually mean by html. Most documents contain not more than about 5 html features. They are headings h1, h2 and h3. We then have the new line or break <br> element (notice only one and no /) and the paragraph marker. If your document is fairly flat with a main heading and a couple of sub headings then this should be enough. Your main Word Heading1 is simply replaced by <H1>My Heading 1</H1> (Just in case you are wondering why My Heading 1 is in normal text this is because the heading tags are written so they can be seen and the browser does not interpret their meaning.)
As you can see many elements have a start and an end with the same characters except the end one is preceeded by a forward slash, / to show the ending.
So, using the above technique simple go through your document and insert the heading markers and everything else within paragraph markers. Use the <br> to add extra lines for formatting and thats it.
The code you upload to your website will inherit the style from the website and look consistent. If you want to do anything more sophisticated then you should consider using an html editor such as a free html editor like HTML Kit. It is very good and colour codes the features. It allows you to write your code and view it so you can play and see what it looks like.
Filed under Building Websites, Tech Tips by

