Proof positive that HTML5 ain't no good. *Nod.*
Before actually publishing on CD, I might switch it back over to HTML 4.01--that's what I used when I started, but I kept leaving out end tags, and the validator didn't pick that up. XHTML 1.0 was not as forgiving, which helped.
And yes, I AM going to be picky. After a course in COBOL where some of the examples had ERRORS IN THEM (*:mad: snarl, snap, gripe :mad:*) I am going to be picky and teach the best coding practices I can, and DEMOSTRATE them when someone looks at my code and make darned SURE that my pages have no errors.
*Takes calming drink of coffee.*
That, and it lets me use the W3C validation badges if I need to demonstrate an image.
And before you ask, no, I'm not so naive as to think that excellent coding = excellent page.
It's certainly true that the HTML5 spec is not fully backward compatible with the HTML4 spec. HTML5 removed some elements and attributes that went unused. Those same attributes in your XHTML document, though valid, are ignored by the browser, and so don't really serve any purpose.
It's also worth noting that the browsers don't care what version of HTML you declare in your doctype. Whether HTML4, XHTML, or HTML5, the browsers will parse your page the same way, which is why developers today are generally opting for the shorter and simpler HTML5 doctype.
All right, so which attributes would YOU trim out of the following element and yes, they're all there. Unfortunately, I forgot "media='all'".
<link rel="prev" rev="next" type="text/html" charset="utf-8" hreflang="en-CA" class="chap css-selectors" href="../CSS/CSS/CSS-Selectors.html" title="CSS Selectors" />
ADDENDUM: Oh, and don't misrepresent the value of the standards. You'll create a fleet of developers who limit their ability to create and their efficiency in doing so on account of their obsessions with fairly meaningless standards.
Hmmm... apparently, you CAN get away with omitting the "type" attribute in XHTML...
ElementML 2.6491203-B by the time it's all done. :D
The "rev" attribute, I believe, doesn't serve any practical purpose.Quote:
Originally Posted by Mr Initial Man
The "type" attribute seems to still be valid in HTML5, but I believe it's largely useless, especially when the type is HTML. According to the HTML4 spec, the "type" attribute gives browsers the option to skip fetching the content if the browser doesn't support that content's type. But since every browser supports HTML.....
The charset is determined from the HTTP response. I believe this attribute is largely ignored.
I'm not at all sure what the "class" is supposed to accomplish.
I don't know of any browser or even screen reader that will render the "title"'s advisory information.
And to boot, it seems that the whole tag -- a "prev" link -- is ignored altogether. "next" links give the browser the option to preload the next page, but "prev" links don't seem to do anything at all.
*Checks.* Hm. I thought Opera had some kind of support for it--it does lovely things with rel="next"
I'll admit--I crammed a whole bunch of attributes in there just because they were valid.
I checked; it IS valid.HTML Code:
rel="prev" rev="next" type="text/html" charset="utf-8"
hreflang="en-CA" class="chap css-selectors" id="NextLink"
style="display:none;" lang="en-CA" dir="ltr" onclick="doNothing()"
title="CSS Selectors" media="all"
It spawned a couple of discussions:
I've kept it because it's easily the silliest thing I've ever done with XML.