dropshado.ws

Front-end development minutiæ

by David DeSandro

Archive
RSS feed
Twitter
GitHub Pages mirror

Type attribute in script element

The type attribute gives the language of the script or format of the data. If the attribute is present, its value must be a valid MIME type. The charset parameter must not be specified. The default, which is used if the attribute is absent, is "text/javascript"

To resolve a question in the HTML5 Boilerplate repo. Important to note is that the details provided on w3schools misleads that the type attribute is required.

27 Oct 2010
  • html
  • html5
  • markup
  • desandro.com
  • @desandro
  • github.com/desandro
  • desandro’s JS Fiddles