W3C HTML Validator Invalid

, , …,

The W3C HTML Validator is getting annoying.

Doesn'T Support Data URI Scheme

as of , the w3c CSS validator doesn't support CSS Data URI Scheme.

w3c css validation data uri scheme fail 2014-07-24
W3C CSS validation, data URI scheme fail

here's the sample file: css_data_uri_scheme.css

here's the link http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fxahlee.info%2Fjs%2Fcss_data_uri_scheme.css&profile=css3&usermedium=all&warning=1&vextwarning=&lang=en

Missing Open Tag as Valid

If you have a page without a opening “body” tag, but does have a closing one, W3C HTML validation report it as valid.

Maybe it's technically valid, but quite annoying.

Test page: W3 HTML Validation Problem: No Open Body.

XHTML Style “<br />” Tag as Valid HTML4

If you use the XHTML style tag such as <br />, it's also reported as valid. W3C only gives a warning. However, this is technically invalid.

Test page: W3 HTML Validation Problem: Slash End Tag.

“p” Tag in “li” as Valid HTML4

If you have “p” tag inside “li”, it's valid! Even in HTML 4 strict.

(Note that technically any ending tag of “p” and “li” can be omitted.)

Test page: W3C HTML Validation Problem: p in li.

ID Value Can Start with a Unicode Symbol!

By W3C spec at http://www.w3.org/TR/html401/types.html#type-name, the value for element attribute (⁖ {id, class}) must start with a letter. Quote:

ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".").

However, you can start with a Unicode greek α and it passes W3C's validator.

<p id="ααα">This paragraph has id “ααα”.</p>

Here's a test page: Test: Unicode Character in HTML ID Attribute Value.

Like what you read? Buy JavaScript in Depth. Thanks.