W3C home > Mailing lists > Public > www-validator@w3.org > December 2017

Re: type attributes for javascript and style

From: Philip Taylor (RHUoL) <P.Taylor@Rhul.Ac.Uk>
Date: Sat, 9 Dec 2017 11:02:45 +0000
To: Jens Oliver Meiert <jens@meiert.com>, Gert Ebersbach <mail@ge-webdesign.de>
Cc: W3C WWW Validator <www-validator@w3.org>
Message-ID: <59136cbd-b53b-bd41-c60b-fa8b634a05da@Rhul.Ac.Uk>
Jens Oliver Meiert wrote:
>> I've noticed, that type attributes for javascript and style are causing
>> warnings. Why? They are "unnecessary", but not forbidden.
> That’s why a warning is thrown and not an error :)
>
> The line is certainly a bit arbitrary (unneeded end tags, for example,
> don’t result in like warnings) but the question is certainly
> legitimate: Why use code that is unnecessary?
May I respectfully suggest "to render the code maximally intelligible to 
human readers" ?  Terseness /may/ have a place where the sole object is 
to maximise the speed of delivery and/or rendering, but in any situation 
where it is probable or even possible that a human may need to read 
and/or modify the code at some point, I prefer explicitness and even 
redundancy.  I draw the line at redundant semi-colons. though, which I 
eschew with a vengeance.

Philip Taylor
Received on Saturday, 9 December 2017 11:04:03 UTC

This archive was generated by hypermail 2.3.1 : Saturday, 9 December 2017 11:04:12 UTC