dperini/nwevents — comment on commit bc9c540137ffa956868cc1580231332a825747d1
File:  line 0
By dperini:

It may be that browsers will skip the "Content-Type" header embedded in an HTML document when using a META tag for that.

However I was talking about HTML4 / HTML5 "parsers" in general, not just for browsers.

An HTML parser may be included in a browser but it doesn't qualify as a browser.

Look at this sample:

TEST

Test

if you cut & paste it in http://validator.w3.org it validates as HTML5.

And if you change the DOCTYPE to:

it still validates as HTML4 if automatic DOCTYPE detection is set in the options.

This means that the line:

is valid both in HTML5 and in HTML4 documents, while:

only validates in HTML5 documents having an HTML5 DOCTYPE.

This is not to said that the above HTML test validates, in fact it doesn't.

The point was only about the specific META tag.