Re: HTML5 style and script tags

I believe a warning about the redundancy of the "type" attr would help 
to encourage reduction of the size of a document's markup in general. I 
like HTML5 because of its semantic markup. And, being a minimalist 
coder, I love not having to use excess or redundant attributes when I 
don't have to.


On 10/20/11 6:45 AM, Jukka K. Korpela wrote:
> 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).
>

Received on Thursday, 20 October 2011 12:20:56 UTC