View on GitHub qJake's

Tidbits

Bits of development knowledge from experience and headache.

Is the 'type' attribute required on <script> tags?

Posted on: Tuesday, January 5, 2016

For HTML 4.01 (and below), the <script> tag specification states that the type attribute is required (and is most always set to text/javascript).

For HTML 5, the <script> tag specification states that the type attribute is optional, and defaults to text/javascript if not specified.