[html5] <script> tag "type" and backwards compatibility?
mickyhulse.lists at gmail.com
Wed Apr 27 13:54:30 PDT 2011
Sorry in advance if this is a silly question...
Will "<script>" tag work in older browsers if I omit the "type" attribute?
In HTML4, the specs say:
type = content-type [CI]
This attribute specifies the scripting language of the element's
contents and overrides the default scripting language. The scripting
Authors must supply a value for this attribute. There is no default
value for this attribute.
When used to include dynamic scripts, the scripts may either be
embedded inline or may be imported from an external file using the src
then the type attribute must be present, as described below. Whatever
language is used, the contents of the script element must conform with
the requirements of that language's specification.
I assume that it would be safest for me to specify the content type
for the sake of older browsers?
More information about the Help