HTML <script> Tag
Description:
The <script> tag is used for declaring a script (such as JavaScript) within your HTML document.
Specific Attributes:
| Attribute | Definition |
| name | Defines the name of the parameter. |
| src | Specifies a URI/URL of an external script. |
| type | Specifies the scripting language as a content-type (MIME type). |
| language | Specifies the scripting language, however, this attribute has been deprecated. Use the type attribute instead. |
| 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. |
Other Attributes:
| Attribute | Definition |
| charset | Defines the character encoding that the script uses. |
Example Code:
<script type="text/javascript">
document.write("Hello World!")
</script>