W3C home > Mailing lists > Public > html-tidy@w3.org > January to March 2002

FAQ: After running Tidy, my page looks broken, why?

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Sat, 30 Mar 2002 16:24:38 +0100
To: html-tidy@w3.org
Message-ID: <ikkbaus3rq3aakg92gmkpd20l99lcojklo@4ax.com>
After running Tidy, my page looks broken, why?

This may have two reasons, either it's a bug in HTML Tidy or your
browser uses some kind of doctype switching to switch between some
compatibility mode and a standards compliance mode. Browsers like
Mozilla, Netscape Navigator 6, Internet Explorer 6 for Windows and
MacIE 5 are known to interprete your source code differently, depending
on the document type declaration you use in your document. Typically,
Tidy will change the document to activate the standard compliant mode in
these browsers, especially if you convert your document to XHTML.

If it's definitly a bug in HTML Tidy, please [report this bug],
otherwise fixing won't be easy. Your page depends on the broken
behaivour of some browsers and those browsers fixed the bugs that
caused that behaivour. For reasons of backwards compatibility they
keeped the old behaivour depending on the document type declaration
of the relevant document. You need to replace the doctype HTML Tidy
inserted in the document with some doctype that triggers backward
compatibility in those browsers. This won't solve the problem for
browsers, that do not have such doctype switch and adhere to the
standards. You may also code your document according to the standards
(that's obviously recommended), but then your page may no longer be
rendered as intended in older browser versions.

For more information on doctype switching please take a look at

 * http://www.hut.fi/~hsivonen/doctype.html
 * http://gutfeldt.ch/matthias/articles/doctypeswitch.html
 * http://www.oreillynet.com/pub/a/javascript/synd/2001/08/28/doctype.html
 * http://mozilla.org/docs/web-developer/quirks/doctypes.html
 * http://msdn.microsoft.com/library/en-us/dnie60/html/cssenhancements.asp?frame=true#cssenhancements_topic2
Received on Saturday, 30 March 2002 10:25:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:51 GMT