Re: HTML5 style and script tags

19.10.2011 18:37, Matthew Jordan wrote:

> I noticed that when checking HTML5 documents, the validator does not
> throw a warning about the use (in this case being present) of the "type"
> attribute in style and script tags.

Do you think it should? As far as I can see, current HTML5 drafts don't 
make that attribute obsolete, deprecated, discouraged or otherwise 
flamed in a manner that would require that a warning be given. The 
attribute is just redundant, not bad.

There's a related question: What happens when the attribute is present 
and its value is pragmatically wrong, as in <style type=text/css> or 
<script type=text/javascirpt>? Nothing, it seems. The validator does not 
check the value against a list of types that are actually useable in 
these contents - or even registered as MIME types. It only checks that 
the value is _formally_ of the general format for MIME type names (so 
e.g. <style type=text\css> would be detected).

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/

Received on Thursday, 20 October 2011 10:45:53 UTC