Hacker News new | past | comments | ask | show | jobs | submit login
The Fundamentals, Primitives and History of HTML5 (paulirish.com)
70 points by DanielRibeiro on Nov 21, 2011 | hide | past | favorite | 11 comments



Allowing to omit closing tags is a bad idea. It doesn't add to clarity. In fact, it makes complex HTML much harder to read. And if you want to write your own simple parser - good luck dealing with all those special cases. Where is the benefit?

If you want minimalism, true minimalism, you should come up with a simpler model, rather than introducing a myriad of special cases to an already complicated model.


If CSS selector behaviour and the DOM elude you—especially if you use them in production and they still elude you—this is a must watch: it's relatively short[1], no nonsense, and though not definitive, it's a nice way to get up to speed with what's behind HTML5 and why all the buzz.

[1]: Definitely shorter than what I'd suggest as an alternative—Mark Pilgrim's history of HTML5 <http://diveintohtml5.info/past.html>.

(PS - @DanielRibeiro: what a small world, a friend of mine works at the company you used to be CTO of!)


Small note: wrapping URLs in <> confuses the URL parser.


More precisely, the url is:

http://diveintohtml5.info/past.html

PS @rufibarbatus : It sure is! I still keep in touch with them (some of them are here on hacker news: http://news.ycombinator.com/item?id=3192719)


I loved this presentation. But just out of curiosity, why aren't these techniques (not closing tags or quoting attributes) used in HTML5 Boilerplate?


This is awesome. I love the minified markup. To think what I could have been doing with all the time I've spent closing tags and quoting attributes.


Beware: The browser may handle unclosed tags just fine, but many times your markup goes through a library first, and libraries vary in their support. For example, I found I had to close my tags when writing HTML in jQuery templates, and I found a bug in Zepto the other day with creating HTML from a string containing multiple self-closing tags (a similar practice).

After being bit those few times, I've gone back to closing all my tags (even when the w3 spec says unclosed is more correct). If I'm going to have to do it sometimes, I'd rather be consistent and do it all the time.


It is not even a new feature. It had been supported since beginning of HTML and was preserved even in HTML4.


How much of this stuff will doom you if any of your users are still stuck on IE? (unclosed tags, new more concise doctypes, simpler document structure, utf8 element values and text, other cool HTML5 standard markup)

Is this a preview of the web we might be able to write in fifteen years when Microsoft allows us to catch up?


If your question is whether HTML5 is backward-compatible with IE6, then the answer is yes (as much as possible). It should be noted that much of the parsing complexity and looser validation are simply observations from IE6's behavior. The new elements and attributes are mostly just ignored in IE6 (article, input type=url, etc.) As for unclosed tags and unquoted attributes, they have been around since HTML 1.0[1], so I don't think you can blame HTML5 for introducing them.

[1]: http://www.w3.org/History/19921103-hypertext/hypertext/WWW/M...


"How much of this stuff will doom you if any of your users are still stuck on IE?"

Or "stuck" on Firefox. His nice minimal html running example works on Chromium/Ubuntu for me, but not on FF8/Ubuntu for me. In the part where you're supposed to see the html inside the pre tag, all I get rendered is "undefined", although I do get the three emphasized bangs at the end of "Foundation."

Is this all "nice if you're on Chrom(ium)", or am I likely doing it wrong?




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: