I was kidding. Sometimes I'll haul out the old doctypes, just so I can stick something like http://validator.w3.org/images/v15445 on a page.
I've been doing some experiments and I've found a serious reason why, if you're serving a page as XHTML, you SHOULD use the XHTML 1.0 or 1.1 doctype.
To quote my book (I was talking about XML namespaces), "Yes, this does mean that the Doctype isn't quite sufficient and can even be done away with—but without a Doctype, good luck validating your markup and you can kiss almost all your character entity references goodbye."
Doing an experimental conversion of XHTML 1.0 to XHTML5 taught me that the hard way.
The other major question I have is what to do with these:
HTML5 doesn't seem to like the values of those name and rel attributes.HTML Code:
<meta name="Book_Title" content="Website Creation in Plain English" />
<meta name="Section" content="Cascading Style Sheets" />
<meta name="Chapter" content="Font And Text" />
<link rel="SectionStart"href="../CSS/CSS-Intro.html" />
<link rel="NextSection" href="../JS/JS-Intro.html" />
<a rel="SectionStart" href="../CSS/CSS-Intro.html">Beginning of Section</a>
<a rel="NextSection" href="../JS/JS-Intro.html">Next Section</a>
When you say that HTML5 doesn't like them, do you mean you're seeing rendering issues? Or validation issues?
If it's just a validation issue, I'd say, who cares? If the browser sees an attribute it doesn't recognize, it won't through a fit like the validator does. It'll just ignore it. Or, if you really want to be a stickler for the rules and you're preprocessing the page with PHP anyway, just strip the problem attributes out when the page is being assembled for the browser. And how you go about differentiating between the browser and your PHP scripts -- depends on your site architecture, I'd say.
ADDENDUM: But personally, I've left non-spec attributes tags on "business critical" pages for server-side use without any repercussions. Pages that've been the landing page for large marketing efforts, event registration, etc. I have yet to get a call or an email from someone b/c the page doesn't validate or render correctly.
That being said, there are probably easier ways to feed data to your PHP script than HTML meta tags. It may be worth your while to explore other implementation options.
So I have achieved HTML5 mastery? :DHTML Code:
<title>My First Page</title>
*Welcome!* This is my -first- webpage!
It's a fairly simple webpage, but it -is- a complete webpage.</pre>
HI ! i am one of the lovers of jquery. Jquery is not for amateurs. May be i am not able to use good coding standard but lot of my seniors are also interested in jquery.
But if there's some reason I'm not aware of why that wouldn't work, then you could also define the book's hierarchy as a JSON data structure:
Or, alternatively, the increasingly popular YAML format:Code:
"title": "Website Creation in Plain English",
"title": "Cascading Style Sheets",
title: Website Creation in Plain English
- title: Beginning
- title: Cascading Style Sheets
- Value Types
In that case, you could still use JSON or YAML to define the relationships between sections and chapters (instead of meta tags), and still parse each page for subheadings.