Name
script
Synopsis
<script>...</script>
Places a script in the document (usually JavaScript for web
documents). It may appear any number of times in the head or body of the document. The script may be
provided in the script element or
in an external file (by providing the src attribute).
Attributes
-
charset="character set" Indicates the character encoding of an external script document (it is not relevant to the content of the
scriptelement)defer="defer"Indicates to the user agent that the script will not generate document content, so the user agent may continue rendering.
id="text"XHTML only. Assigns a unique identifying name to the object.
-
language="text" Deprecated. Provides the name of the scripting language, but since it is not standardized, it has been deprecated in favor of the
typeattribute.-
src="url" Provides the location of an external script.
-
type="content-type" Required. Specifies the scripting language used for the current script. This setting overrides any default script setting for the document. The value is a content type, most often
text/javascript.