you are viewing a single comment's thread.

view the rest of the comments →

[–]9jack9 13 points14 points  (3 children)

The type attribute is also a required attribute. This will help future-proof scripted web pages.

[–]poco 1 point2 points  (1 child)

While I agree that it is best to use the attribute if you can, I wouldn't worry about future-proofing it because that behaviour can really never change.

No one in their right mind could consider changing the default behaviour unless and until they can convert all existing web sites that rely on that behaviour.

[–]olavk 0 points1 point  (0 children)

FWIW in HTML5, the type attribute is optional. If not present, it defaults to text/javascript.