Yes, You Can Use HTML 5 Today!

And the great thing is that the form still works for lesser browsers, even if you have to rely on them typing things in accurately or using some secondary validation.

Also, now since there can be multiple h1’s on a page, what can dictate the most important heading on a page?

It depends on how many sections are nested.

section section h1
will be deemed to have a higher priority than
section section section section h1.
So far, so good.

But what about if you are using a mixture of nested sections and h1–h6 elements? What order would the following rank in?

  1. section h4
  2. section section section h1
  3. section h2
  4. section section h4
  5. section section h1

It would be, most important first: 3, 1, 5, 4, 2
The first thing to look at is the number of section elements nested. The fewer sections, the higher ranking the heading element is. Within each level of sectioning, if there are heading elements of different levels then ranking within those reverts to the traditional practice of low numbers outranking high numbers.

<h> would be a much cleaner solution without the specificity headache.

Very interesting… I am going to have to research this a lot further…

“It seems unlikely to me that the hgroup element will make it through various revisions of the spec, and I struggle to find a real use case for it in this example.”

Here’s a real use case. Generally I add a fair chunk of white space above H2 elements to separate the next section from paragraphs above. If I have a H1 followed by a H2 the H2 would look ridiculous with all the white space above it. I could apply a style

hgroup h2 {
margin-top: 0px;

I’m a big fan of the <canvas> element. Fortunately, most browsers other than IE support it and there is a work-around for IE. The rest of HTML 5 doesn’t really seem like that big of change…

Interesting article! I have to say that I’m not that impressed with HTML5 though. For someone coming more from a development background than a design background, I dumped sloppy HTML4 for XHTML1 a couple years back. Seeing HTML5 come out is like seeing the new 2010 lineup of Yugos. That’s great, but it’s just not relevant to what I do. Especially with all the things they screwed up in it.

Yes, you can use HTML5 if you rely on Javascript to make it only semi-functional in the most common browsers around today.

Thanks but no thanks. I’ll stick to HTML 4.

Not to pee in your campfire, but we can find hundreds of putatively well-designed sites that don’t follow this rule. (My sites do, but that’s because I learned better reading through these forum threads. :smiley: )

@Chroniclemaster1: Please tell us why do you think HTML4 is sloppy?

Right - You can use HTML5 right now - A great example is the new Google search pages where they slap a doctype html on their HTML3 markup and nevermind the validation…

Progress? I think NOT

Especially since Google “owns” HTML5 since they employ Hixie - go figure why even they won’t bother with this “latest, greatest” markup!

Relevant enough, I am going camping this weekend :lol:

A lot of the designs I develop as well don’t follow this rule, but that’s when absolute positioning comes into play…

Also in other developer features we can use today, don’t forget about navigator.geolocation. It’s available in Safari 4 on the iPhone and the new Firefox 3.5.

This isn’t just for handheld devices with GPS built in. It can also use your IP address and local Wifi networks to approximate your location. There is huge potential for useful applications of Web sites that can be customized to where you are.

Specs are at and I have a small demo at (Sorry, SitePoint won’t let me post real links in my comments yet.)

It’s personal preference, but the “freedom” of HTML (like to close tags… or not ) is counterintuitive to me. XHTML requires much more rigorous structure; it’s very logical, and I like it much better for that reason.

:slight_smile: The comparison that springs to mind is HTML is the permissive parent that lets you choose to do things one way this time and do it completely differently another. No thank you. When I’m in an art museum I may want to browse at my leisure, but when I’m writing webpages, I want to know the rules.

It’s not the language that’s sloppy, it’s the authors. You can achieve exactly the same strictness with HTML4 as you can with XHTML. The only real differences between the two are the trailing / on self-closing tags and the fact that XHTML’s parser is more draconian if you’re serving your pages correctly, which you wouldn’t do anyway cos IE would choke on it.

That’s what I reckon; no need for a number if you’re only ever going to use one hx tag.

That depends if you are only ever going to use one h[I]x[/I] tag. I can think of plenty of documents where I wouldn’t want to keep nesting section elements but would want a hierarchy of headings - retaining the flexibility to use h[I]x[/I] elements to denote the structure of the document is useful.

I don’t understand this attitude at all (and it doesn’t relate to this thread either).

I write HTML to conform to a strict Doctype, and with all tags closed, even when they are optional. The fact that I am being slightly more rigorous than the rules require has no bearing on the matter - I have standards for presentation and layout of code that are not required either, but I stick to them. Who cares? I write the code just as carefully as I would do for XHTML, except that I don’t have to worry about the illogical farce of closing spot elements that have no content to close.

But, as I said, that is completely by the by here. HTML5 will have a counterpart XHTML5, which will bring the rigorous but ridiculous regime of XHTML with the fab new facets and features of v5.

Now that the W3C working group has effectively stopped work on xhtml, (see - the w3c’s xhtml-faq about the future of xhtml) sorry but was not allowed to post a link.

The future of xhtml is effectively finished, and html 5 is now the only viable option for the future.


:slight_smile: And of course no server on the planet actually serves XHTML correctly.

I certainly agree with you about HTML authors, for that matter there are plenty of sloppy XHTML writers too. Which you have to admit is amusing, since in HTML you’re at least within the markup specs while in XHTML you’re simply writing invalid code.

That’s one of the things that’s great about HTML though, the flexibility allows people who know nothing about webpages to have a much better chance of writing valid code. HTML is how I started writing webpages, and it’s flexibility is probably the single most important feature in “weekend warriors” getting into the internet in the first place. To that extent I know HTML5 is a good thing simply because it means HTML and XHTML will be parallel technologies for years to come. Personally, it bugs me that you “might” close a tags or you “might” not. Once I took up writing Javascripts and then got into programming, HTML doesn’t have hard and fast rules like that. I grew to like XHTML better because it has the same guidelines of the other technologies I work with.

…And of course I labor under the completely fruitless hope that one day the W3C will remember us XHTMLers and push for “true” XHTML on the web. Then we can start doing some of the great things they originally sold the web community on for XHTML. Then I’ll just have to brush my website into shape and be good to go. One day… sigh

Of course you can configure server software to serve XHTML correctly (as defined in the W3C specification) – or you can do it yourself via server-side scripting (follow the page link in my signature block) – but then the ouput isn’t really viable (as you point out) being unusable by MSIE Browsers.

Also check Producing and serving XHTML 1.0 pages


Not quite true, unless IIS is the only web server on the planet. Oh, wait! It’s not. Going beyond what jamesicus said, Apache honors the .xhtml and .xhtm extensions MIME types and delivers documents having either of those extensions with the content type as application/xhtml+xml.

You may also configure Apache to deliver .php, etc. as application/xhtml+xml in either the main configuration, or by using an .htaccess file.