A script with the type attribute specified:
The type attribute specifies the Internet media type (formerly known as MIME type) of a script.
The type attribute identifies the content between the <script> and </script> tags.
The media type consists of two parts: one media type and one subtype. For JavaScript, the media type is "text/javascript".
Attribute | |||||
---|---|---|---|---|---|
type | Yes | Yes | Yes | Yes | Yes |
In HTML5, the type attribute is no longer required for JavaScript. The default value is "text/javascript".
Value | Description |
---|---|
media_type | Specifies the Internet media type of the script. Some common values:
Look at IANA Media Types for a complete list of standard media types. |