W3C home > Mailing lists > Public > www-validator@w3.org > October 2011

Re: HTML5 style and script tags

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Thu, 20 Oct 2011 13:45:14 +0300
Message-ID: <4E9FFBBA.6050209@cs.tut.fi>
To: Matthew Jordan <matthew@howgreatthouart.com>
CC: www-validator@w3.org
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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:59:23 UTC