The X factor

xhtml

Ready or not...

You may have noticed a slightly different "look" to the home page and this page. Behind the scenes, I am switching from plain old vanilla HTML to XHTML for my website. XHTML is supposed to be the standard markup language for web pages and will be the key to making web content available on additional display devices, such as cell phones. I have no delusions that anybody wants to use their cell phone minutes to read my website on a miniature screen, but I took up the challenge to keep the mind exercised in learning something new. It's the "use it or lose it" principle.

One of the big differences is that XHTML is much fussier. Browsers accept a lot of lousy HTML code, but when you tell the browser that the page is XHTML it expects you to follow the rules — to the letter. For example, in HTML, you use this tag to indicate the start of a new paragraph: <p>. The next time the browser runs into <p> it assumes the previous paragraph must be finished and starts a new one. But XHTML insists that you specifically mark the end of the paragraph with a closing tag: </p>. In fact, every tag must be closed out, even ones that normally stand alone, like <br>, used to start a new line. In XHTML that tag must be written as <br />.

Naturally, the error messages you get when you make a mistake are utterly uninformative. If the message would say, "Hey dummy, you forgot to close that tag out" a person would know what is wrong and how to fix it. Instead, it will say something like "Text is not allowed in this context according to DTD/Schema." Oy, veh!

The other thing that goes along with trying to author in XHTML is using cascading style sheets to define the page layout, rather than using a big table to hold everything in its place. Using tables for layout is "deprecated" these days. The problem is, some things that are trivial to do with a table are real ball-busters for style sheets, such as the Chronicles index pages for each month with the thumbnail pictures laid out neatly in rows and columns.

Eventually I'll want to go back and update the old pages to the new style. I think I can automate a lot of the work, but I want to get much more comfortable with the new rules before I tackle the old pages — there are so many!