JavaScript/Other Script Types

The  element will work in most browsers, because JavaScript is currently the default scripting language of the world wide web. In HTML5, the current spec says that developers should omit the  attribute from script tags, although previously it was recommended to specify what type of script you are using in case the default scripting language changes.

Instead of specifying the scripting language individually in the  element itself, you may also use a meta tag in the head of the document to specify a default scripting language for the entire page.

While the  was formally obsoleted in April 2006 by RFC 4329 in favour of , it is still preferable to continue using   due to HTML validators' and Internet Explorer web browsers' inability to understand