The <script> tag is used for declaring a script (such as JavaScript) within your HTML document.

Example Code:
<script type="text/javascript">
   document.write("Hello World!")
Attribute Definition
async Specifies that the script is executed asynchronously (only for external scripts)
charset Defines the character encoding that the script uses.
defer Declares that the script will not generate any content. Therefore, the browser/user agent can continue parsing and rendering the rest of the page.
src Specifies a URI/URL of an external script.
type Specifies the scripting language as a content-type (MIME type).
Global Attributes:

The <script> tag also supports the Global Attributes in HTML5

Last updated on 2 August 2018 By Rene Spronk

View All HTML Tags

Errors? Please help to keep this list up to date, If you find any errors, please contact us, so that we can get them fixed.