W3C home > Mailing lists > Public > www-validator-css@w3.org > July 2010

CSS Validator Doesn't Recognize HTML5 <style>

From: Doug Schepers <schepers@w3.org>
Date: Tue, 27 Jul 2010 16:27:55 -0400
Message-ID: <4C4F414B.9090807@w3.org>
To: www-validator-css@w3.org
Hi, Yves-

I was testing my fiance's new simple HTML5 site with Unicorn, and I 
found a couple problems [1].  Since the style is inline in a <style> 
element, and not linked to an external stylesheet, it gave the following 
error:
[[
Unrecognized link element or xml-stylesheet PI.
]]

When I look at that page in the CSS Validator, it makes more sense, 
because it also returns the message at the bottom:
[[
No style sheet found
]]

But out of context, on the Unicorn results page, it's not obvious that 
that is what's going on... maybe the output message should read:
[[
No style sheet found, or unrecognized link element or xml-stylesheet PI.
]]

And it shouldn't be reported as an error, just a message or warning. 
(That might be an issue with Unicorn's results processing, too.)


The second issue is that the CSS Validator doesn't seem to recognize the 
HTML5 <style> element, which doesn't requite the 'type="text/css"' 
attribute.  Tom reports that adding that attribute does work with the 
CSS Validator, so maybe that wouldn't be a difficult fix to add HTML5 
support?


[1] 
http://validator.w3.org/unicorn/check?ucn_uri=meganculler.com&ucn_task=conformance#css21-validator_error_1_1
[2] 
http://jigsaw.w3.org/css-validator/validator?uri=meganculler.com&profile=css21&usermedium=all&warning=1&lang=en
-- 
Regards-
-Doug Schepers
W3C Team Contact, SVG and WebApps WGs
Received on Tuesday, 27 July 2010 20:27:57 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 June 2012 00:14:26 GMT