<script type="">

Disclosure: Your support helps keep the site running! We earn a referral fee for some of the services we recommend on this page. Learn more
Attribute of
<script> HTML Tag
What does <script type=""> do?
Specifies the media type of the script.

Browser Heads-Up

The type attribute of <script> specifies the relevant scripting language. It should be used instead of the language attribute, which is deprecated.

Acceptable Values

Specify the script using the applicable IANA media type, a forward slash, and then the subtype. If you don’t specify a type, the browser will assume it is text/javascript in HTML 5.

Claire is seasoned technical writer, editor, and HTML enthusiast. She writes for HTML.com and runs a content agency, Red Robot Media.

Browser Support for type

iefirefoxchromeedgesafariopera
AllAllAllAllAllAll