This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 9595 - HTML Comments before DOCTYPE are not reported as an error.
Summary: HTML Comments before DOCTYPE are not reported as an error.
Status: RESOLVED WONTFIX
Alias: None
Product: HTML Checker
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-27 07:58 UTC by CaTaHaC
Modified: 2015-08-23 07:07 UTC (History)
1 user (show)

See Also:


Attachments

Description CaTaHaC 2010-04-27 07:58:32 UTC
I just bumped into a wierd problem in all IE browsers and it turned out to be an HTML comment just before the DOCTYPE. The validator did not recognize it as an error but all IE browsers failed to properly assign css proeprties etc.
This is not about the problem in IE but rather about the validator not showing the comment before the DOCTYPE as an error as it is an actual error.
Comment 1 Michael[tm] Smith 2010-06-14 08:09:00 UTC
In fact in both the HTML syntax (that is, documents served as text/html and processed by HTML parsers) and in the XHTML/XML syntax (that is, document served with an XML mime time and processed by XML parsers), a comment before the doctype is not an error. If any browser has a problem with such a comment, then the error in the browser, not in the validator.
Comment 2 Michael[tm] Smith 2010-06-14 08:12:59 UTC
I'm told this is a known issue in IE8 and previous versions of IE. Perhaps it's something they've fixed in IE9.