The script element enables dynamic script and data blocks to be included in documents.
global attributes & type & language
global attributes & src★ & defer & async & type & charset & language
Name or Alias field
labeled as “preferred MIME name”;
or, if none of the Alias fields are so labeled, a
case-insensitive match
for a Name field in the registry.UTF-8".<!--" without a matching later occurrence
of the character sequence "-->".//",
optionally preceded by one more more
space (U+0020) characters or tab (U+0009) characters,
followed by any
number of characters that are not a newline, and ending with
a newline/*",
optionally preceded by one more more space (U+0020)
characters or tab (U+0009) characters, and that end with
the character sequence
"*/"A script element must have both a start tag and an end tag.
any element that can contain metadata elements, any element that can contain phrasing elements
interface HTMLScriptElement : HTMLElement { attribute DOMString src; attribute boolean async; attribute boolean defer; attribute DOMString type; attribute DOMString charset; attribute DOMString text; };