W3C home > Mailing lists > Public > public-html@w3.org > February 2008

Trailing slash in doctype

From: Philip Taylor <pjt47@cam.ac.uk>
Date: Wed, 27 Feb 2008 18:32:46 +0000
Message-ID: <47C5ACCE.3010201@cam.ac.uk>
To: HTML WG <public-html@w3.org>

http://www.mobile.de/ (from the Alexa Top 500 list) says:

"http://www.w3.org/TR/html4/strict.dtd" />

IE, Firefox and Opera (I've not tested Safari) treat that as standards 
mode. HTML5 says it must be treated as quirks mode, since the trailing 
slash is a syntax error and sets the 'incorrect' flag during 
tokenisation. Is this likely to be a compatibility problem that HTML5 
should avoid?

Relatedly, http://www.gamespy.com/ says:

     <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>

which is standards mode in IE, quirks mode in Firefox and Opera, and 
quirks mode in HTML5.

I see '..." />' on roughly 0.02% of pages from dmoz.org, and (excluding 
gamespy.com) I see '..."/>' on roughly a quarter of that, so it's not a 
very widespread issue but it does exist.

Philip Taylor
Received on Wednesday, 27 February 2008 18:32:58 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:44:26 UTC