BCR Logo Home Services Events Resources About BCR Search Site Map BCR Online
A c t i o n    f o r     L i b r a r i e s    -    F e b r u a r y    2 0 0 2

The Internet Connection

By Michael Sauers

Those of you who have begun to convert your library's Web site from HTML to XHTML-based coding may already have figured out that this is going to be one very large job. (Every Web designer may want to consider converting; XHTML allows users to extend and expand the capabilities of limited HTML coding.) The job can be easier than it looks. Software exists that can help you.

Here at BCR we use HTML-Kit, a free editor available at www.chami.com/html-kit/. Besides being one of the best text-editors available for Web page creation, it also integrates a program called HTML-Tidy.

HTML-Tidy is a code validation program that will check your code for errors and offer suggestions as to how to fix the problem it has found. For example, if you're missing a </p>, it will insert it where it thinks it should be and give you the opportunity to approve or reject its suggestions.

One hidden feature in the HTML-Kit/HTML-Tidy combination, is the ability to have it convert your code from HTML to XHTML. Here's how to do it.

HTML-Tidy box
  • In HTML-Kit select Edit|Preferences and then select the TIDY tab.
  • Change the Output format from Default to XHTML.
  • Change the Character encoding from Default to UTF-8.
  • In the Switches section be sure the following options are checked:
    • Add XML declaration to XML/XHTML output
    • Add XML processing instruction
    • Assume XML processing instructions
    • Convert ampersands to &amp;
    • Convert I and B tags to EM and STRONG
    • Drop font tags
Tidy button

Once you have set these options, load your HTML document into HTML-Kit and click the HTML-Tidy button. HTML-Tidy will check your code for errors and convert your document to XHTML. In most cases this will do the majority of the conversion work for you.


Comments to: msauers@bcr.org
February 27, 2008
Copyright © 2002 BCR
Valid XHTML 1.0!