I’ve been looking a lot into how asp.net translates its controls into html recently. The menu control for instance puts each menu item in a table cell to make even spacing easier, which is fair enough unless you’re trying to keep up with the Joneses in that nice xhtml0.5 - well it’s never proper xhtml1.0 unless it’s sent out as application\xhtml+xml - website you’re writing at which point a list or even a simple sequence of link tags would be nicer. Even if Stephen Walther points out that everything really is possible, it’s straightforward until you look at the code you’re generating. It reminded me that my CSS is very rusty as well which doesn’t help.
Things to read:
Let’s not quibble about their use of the word recommendation instead of standard. Have you ever tried to read a W3C Standard? There’s a great deal of luck involved as to whether or not the one you need to investigate is written in something remotely resembling English.
The XHTML 1.1 standard is basically in English. At 27 pages as a PDF, it’s perhaps longwinded English, but English nevertheless. Once you get past the fact that everything is normative - that is, it has been sanctioned by the W3C and should not be changed - you learn that the standard tells you three things.
- The standard defines a new XHTML 1.1 document type which notes that the code it contains adheres strictly to the rules given in the W3C’s Modularization of XHTML standard. This second standard basically means that the W3C formally grouped the tags in HTML and XHTML into categories for easier reference and for easier interpretation by browsers. For example, the structure category contains the <head>, <body>, <html>, and <title> elements.
- That the DOCTYPE definition for an XHTML 1.1 document looks like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN""http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
- The rules for writing an XML document that conforms to the XHTML 1.1 standard
That’s easy enough to follow and the w3c validator will check your page for you once it’s built. Of course the Modularization of XHTML standard is 177 pages (PDF) of which two thirds is a completely guide to the DTD for this grouping of tags which isn’t that easy to read, but at least the afternoon started off ok, right? What really annoys with this particular spec is that even after two years of having XML schemas as a standard which should supercede DTDs, the rewriting of XHTML as groups of tags and attributes as Schemas still isn't complete. Come on, W3C, this should be done by now.