Henri Sivonen, a Mozilla developer who wrote Firefox's HTML5 parser, writes about browser quirks, doctypes, character encodings and web standards.
HN commenters cite it for explanations of doctype switching, about:blank behavior, the PNG gamma problem and IE rendering modes.
That's not true.
The browser doesn't validate the content and neither knows nor cares if it would. It does something called doctype sniffing to choose whether it goes into one of a few different modes based entirely on the declaration (or lack of the same) at the top of the document.
"However, it is important to realize that the Quirks mode vs. Standards mode is predominantly about CSS layout and parsing—not HTML parsing.
Some people misleadingly refer to the Standards mode as “strict parsing mode”, which is misunderstood to imply that browsers enforced HTML syntax rules and that a browser could be used to assess the correctness of markup. This is not the case. The browsers do tag soup fix-ups even when the Standards mode layout is in effect. (In 2000 before Netscape 6 was released, Mozilla actually had parser modes that enforced HTML syntax rules. These modes were incompatible with existing Web content and were abandoned.)"
Quoted from (and far more details) here:
http://hsivonen.iki.fi/doctype/
In case of CSS, the important browser was IE.
This reminds me of DOCTYPE switching. From http://hsivonen.iki.fi/almost-precedent/:
"Back when the Quirks Mode and the Almost Standards Mode were introduced ... committees created specs and that were enshrined as W3C Recommendations before there was solid implementation experience. Then the Web Standards Project lobbied browser-makers to implement the W3C specs as they were. The mindset was that the specs given from above couldn’t and shouldn’t change. People thought that vigorous upgrade evangelism would work and make Web authors change their existing sites."
Note that the Web Standards Project was also the one petitioning Netscape to cancel Mariner, which ended up contributing to the problem. Why did non-IE browsers have to implement document.all?
Just to be clear, Firefox doesn't have a validator built-in. It's just syntax highlighting, and it has recently been enhanced to use the same HTML5 parser as the rest of the browser. So yeah you can see some of the errors you might make in your markup but it's very far from what an actual HTML5 validator should do. It doesn't even report all parse errors (and isn't meant to).
I'm pointing this out because of a recent blog post by Mozilla dev Henri Sivonen which says: "Please do not advertise the new View Source implementation by saying that Firefox now has a validator in the View Source window."
(see full post here for all the details, there's a section named Limitations: http://hsivonen.iki.fi/view-source/)
That's exactly what Firefox developers like Henri Sivonen [1] and David Baron [2] think, and their proposals have a lot of support within Mozilla and a high chance of being adopted. It would be great to get other vendors on board too.
[1] http://hsivonen.iki.fi/vendor-prefixes/ (see "Keep Experimental Features in Experimental Builds")
[2] https://groups.google.com/d/msg/mozilla.dev.platform/itl6mtx2dxI/mbdPvbexB2EJ (dbaron is Mozilla's representative to the W3C Advisory Committee as well being a principal engineer on the layout team and deeply involved in the development of CSS over the past decade.)
By ‘current browsers’, I mean all browsers in use = A-grade browsers, including IE6. See http://hsivonen.iki.fi/doctype/ and http://ejohn.org/blog/html5-doctype/#comment-296891
The HTML5 spec is written with backwards compatibility in mind, and the DOCTYPE is one of the examples. HTML5 specs current behavior and implementations. The DOCTYPE would’ve been different if browsers didn’t already support it.
I realize a lot of additional info is lost on people who are viewing the slides but couldn't attend the presentation, and am working on a blog post with some more explanations.
The site looks great and I think it's a great idea.
Here's one small visual bug you can fix: you suffer from the Safari PNG gamma problem (http://hsivonen.iki.fi/png-gamma/). In short, a PNG of a certain RGB color will not match up with that same RGB CSS color in Safari. The easiest solution is to use a 1px by 1px image for your background instead of specifying it as a color in CSS.
Good luck!