On Friday, 16 December 2011 at 23:41:19 UTC, Stewart Gordon wrote:
Yes:
I'll agree that some of the validator's things help with that, but not all of it. If you write <a href="#"><div>block in inline</div></a>, the validator will reject it, but it works... and that's a useful thing when doing drag+drop applications (since older IE doesn't let you drag other elements). Though, I can see your point with cross-browser compatiblity, to an extent, as that code sometimes (not always... it can change across refreshes of the same page...) brings out bugs in Firefox 3.6. Anyway, though, the specific doctype still isn't terribly important, since, in practice, tools tend to ignore it anyway. Browsers see it's presence as an on/off switch with standards compliance mode vs quirks mode; declaring the wrong one doesn't break anything. (Indeed, HTML5 has agreed to use the common, previously wrong, shorthand of <!DOCTYPE html> as the new standard!) Stuff like improperly closed tags or bad entity encoding can break, but that's pretty well independent of doctype validation. That's simply a matter of the document being well-formed.
What are these "things that are useful" to which you refer?
There's the drag and drop issue from above, the custom attributes thing from below, and sometimes, using certain tags or generally accepted shorthand. (For instance, <script> used to require a type, but it worked without it anyway. Again, the html5 folks decided to adjust the standard to fit the practice - something I actually like about them. This is a really minor thing, though.)
Are custom attributes distinguished from standard attributes in some way, in order to keep attributes invented by different browser manufacturers from clashing with each other and with attributes that become part of a later HTML standard?
They are in html5 - the data- prefix is allowed and reserved for the user. In older versions of the html standard, there weren't allowed at all, whether prefixed or not. (They did work in practice, though.) I like custom attributes a lot, since they add a richness that Javascript (and CSS too) can exploit in interactive pages. They're the main thing I miss if I validate with one of the other DTDs.