Menu Home

script

osbo.com | HTML | Elements | script

The script HTML element allows dynamic script and data blocks to be used in documents.

Syntax

HTML

<script attribute-name="attribute-value"></script>

Attributes

Global

Name Value Description
async async | empty Specifies that the script should be executed asynchronously, as soon as it becomes available
charset character encoding name Character encoding of the external script
defer defer | empty Specifies that script should be executed after the document has been parsed
src URI URL for the audio stream
type MIME type MIME type of the content - default is text/javascript

Examples

async

charset

defer

src

type

Web Hypertext Application Technology Working Group (WHATWG)