Archive

Posts Tagged ‘HTML 5’

HTML 5 Parser Lands In Gecko

July 11th, 2009 No comments

John Resig has blogged about HTML 5 parsing and the news that Henri Sivonen (the chap who did the HTML 5 validator) has landed a massive commit to the trunk of Firefox that includes an HTML 5 parser.

The method is quite interesting:

    What’s interesting about this particular implementation is that it’s actually an automated conversion of Henri’s Java HTML 5 parser to C++. This conversion happens automatically and changes will be pushed upstream to the Mozilla codebase.

    Normally I would balk at the mention of a wholesale, programmatic, conversion of a Java codebase over to C++ but the results have been very surprising: A 3% boost in pageload performance.  

  And this is on top of the litany of bug fixes and compliance checks that this code base will be providing. You can examine some of the progress that went into the constructing the patch in the Mozilla bug.

   If you’re interested in giving the new parser a try (it’s doubtful that you’ll see many obvious changes – but any help in hunting down bugs would be appreciated) you can download a nightly of Firefox, open about:config, and set html5.enable to true.

For extra fun, throw in some inline SVG and see it just work! Bye bye namespaces!

Pithy HTML5/XHTML comments

Dan Morill (Android and formerly GWT fame and al-round good guy) had some funny remarks on the XHTML/HTML5 kerfuffle:

    An exercise: I can easily summarize HTML5 in a single Tweet. I can’t think of a way to do that for XHTML. “HTML5 codifies existing behaviors and is a practitioner’s roadmap for the future of browser capabilities.”

    This “death of XHTML” meme is awesome, it’s soooo easy to bust out with pithy zingers. 

   Here’s one: “The web *itself* is content soup, why should we expect HTML to be more than tag soup?” 

   Another: “XHTML was the Edsel of the web: painstakingly designed, proudly touted, and utterly missing the point.”   

“They finally closed the tag on XHTML, and now the web is validated.”

HTML 5 section is not just a “semantic div”

March 24th, 2009 No comments

James Graham of Opera has a post about how section is not just a semantic div that argues against the folks that think that we can get by with just div class="section" for example:

HTML 5 introduces new elements like <section>, <article> and <footer> for structuring the content in your webpages. They can be employed in many situations where <div> is used today and should help you make more readable, maintainable, HTML source. But if you just go through your document and blindly replace all the <div>s with <section>s you are doing it wrong.

This is not just semantic nit-picking, there is a practical reason to use these elements correctly.

In HTML 5, there is an algorithm for constructing an outline view of documents. This can be used, for example by AT, to help a user navigate through a document. And <section> and friends are an important part of this algorithm. Each time you nest a <section>, you increase the outline depth by 1 (in case you are wondering what the advantages of this model are compared to the traditional <h1>-<h6> model, consider a web based feedreader that wants to integrate the document structure of the syndicated content with that of the surrounding site. In HTML 4 this means parsing all the content and renumbering all the headings. In HTML5 the headings end up at the right depth for free).

You can also talk about other items such as the new menu tag that the browser can render with an interesting native menu item.

Categories: Webmasters Resources Tags: