9.6. Converting Source Documents to Web Pages

Problem

You need to produce clean, validly coded web pages out of documents created in a word processing or page layout program (without spending hours doing it).

Solution

Address the problem at both the starting point when documents are created, as well as at the point where you make the conversion.

  • Get involved in the creation of documents destined for your web site.

  • Explain what you need to the content creators.

  • Set up templates that generate consistent, web-friendly documents.

  • Use HTML processing utilities such as Dreamweaver, HTML Tidy, and/or Word Cleaner to develop methods for converting documents to web pages.

  • Automate the routines wherever possible.

  • Take a long lunch and go home early.

Discussion

The "Save as HTML" functions of many desktop applications—particularly the widely used Microsoft Office programs—are infamous for the bloated, non-standard code they generate. As a web site builder, you will almost certainly find yourself on the receiving end of these files as part of your site building or regular maintenance duties. These two strategies, especially when used together, can help make your job easier:

  1. Optimize the creation of the source documents to make conversion as smooth as possible. Then employ one or more conversion utilities to generate web page code that meets the same standards as pages you create yourself. Although it's certainly easier said (and written) than done, your best strategy for improving the quality of the source ...

Get Web Site Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.