logoalt Hacker News

Telemakhostoday at 1:24 PM2 repliesview on HN

You only had to include a doctype if you needed to turn on strict XML rendering or do fun things with XSLT. It was great if you wanted to convert, say, TEI to something browsers could read.

You were always, since the days of HTML 1.0, able to use just <html> to open your document without a doctype. It would be in tag-soup mode, but for most documents (rather than applications) that was fine. Not only do you not need a doctype, but you don't even need a <head> statement... browsers will generate one if you leave it out.


Replies

Klonoartoday at 2:03 PM

I am almost positive that there was one version of IE where having any space or newline before the DocType would trigger quirks mode.

zdragnartoday at 1:35 PM

Technically yes, but the struggle to keep IE out of quirks mode was real, and that meant a doctype and head and all the things.