NYPL: Style Guide: XHTML: Benefits
NYPL: Style Guide: XHTML: Benefits : um, what are they again? The web is moving to XML, which is moderately useful for data interchange, so I should write my web pages as fake XML? It’s cleaner and more logical? In what way is <br /> more logical than <br>? Proper nesting is better than improper, but improper nesting was never right in HTML either. Increased interoperability? You are just saying the same thing: write good markup, whether it is HTML or XHTML, and it will interop: show me the device that can read valid XHTML and not valid HTML, and I’ll bet it’s an XHTML validator. Greater accessibility? Okay, that’s three out of four reasons that are exactly the same reason. Two reasons: XML is being hyped, and you are more likely to validate XHTML than you are to validate HTML. Having discovered through Kate’s validation of the <noscript> section of my Blogger archive scripts just how valuable XHTML validation can be. An A tag can only contain inline elements, script is an inline element when it wants to be, as is noscript, but noscript must contain a block level element, so to pass the validator a link that gets text from a script, like a comment link, must be:
<a href=””><script…></script><noscript><p>comment</p></noscript><a>
Thanks, I’ll skip this revolution.
Yes yes YES! I so agree with you.
After ranting about how the noscript tag should be valid as used in the archive scripting on my site a couple of pedants ranted back that I was wrong.
But I totally agree with you – XHTML is just another product to be marketed. Not necessarily needed or wanted – just merchandised.
That must have required some serious pedantry, to argue that requiring a block-level element inside a block/inline element inside an inline element somehow makes sense. The only way it makes sense to me is the Humpty Dumpty sense: ”when I use a word, it means exactly what I want it to mean.” Block means block unless it is inside a block/inline in an inline. Bah. They screwed up the DTD.
[strokes his XML parser]
Potential solution to your noscript problem: Generate the a element tags within the script bit as well, then have them in full in the noscript section. That way you don’t need a noscript block inside the a tag. It does seem a bit odd that noscript requires a block level element inside it though, probably worth posting to the www-html@w3.org mailing list.