Yet another way HTML5 is cleaner

I don’t think I’m a total neat-freak. However, it’s so satisfying to change a doctype such as this: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  "">

to the HTML5 version: <!DOCTYPE html>

Looking at the source code of HTML5 evangelists, I’m noticing script tags that look like this: <script>boo();</script>

instead of this: <script type="text/javascript">eek();</script>

Isn’t the type attribute required? No longer, and thank goodness. Here’s what the spec says:

The type attribute gives the language of the script or format of the data. If the attribute is present, its value must be a valid MIME type. The charset parameter must not be specified. The default, which is used if the attribute is absent, is “text/javascript”.

This is small, but kinda not so, considering how often we use it. I mean, we’ve been adding the required “type” to our script tags when 99.99% of our scripts have always been text/javascript. In ten years I don’t think I’ve ever included another browser scripting language this way. Now it’s the default as it should be. Nice!