HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

script

Description

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

Syntax

HTML

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

Attributes

Global

NameValueDescription
asyncasync | emptySpecifies that the script should be executed asynchronously, as soon as it becomes available
charsetcharacter encoding nameCharacter encoding of the external script
crossoriginanonymousSends crossorigin request without credentials
use-credentialsSends crossorigin request with credentials
deferdefer | emptySpecifies that script should be executed after the document has been parsed
referrerpolicyno-referrerSpecifies that no referrer information is to be sent along with requests to any origin.
no-referrer-when-downgradeSends a request’s full referrerURL stripped for use as a referrer for requests: whose referrerURL and current URL are both potentially trustworthy URLs, or whose referrerURL is a non-potentially trustworthy URL.
originSpecifies that only the ASCII serialization of the request’s referrerURL is sent as referrer information when making both same-origin-referrer requests and cross-origin-referrer requests.
origin-when-cross-originSpecifies that a request’s full referrerURL is sent as referrer information when making same-origin-referrer requests, and only the ASCII serialization of the origin of the request’s referrerURL is sent as referrer information when making cross-origin-referrer requests.
same-originSpecifies that a request’s full referrerURL is sent as referrer information when making same-origin-referrer requests.
strict-originSends the ASCII serialization of the origin of the referrerURL for requests: whose referrerURL and current URL are both potentially trustworthy URLs, or whose referrerURL is a non-potentially trustworthy URL.
strict-origin-when-cross-origin | emptySpecifies that a request’s full referrerURL is sent as referrer information when making same-origin-referrer requests, and only the ASCII serialization of the origin of the request’s referrerURL when making cross-origin-referrer requests: whose referrerURL and current URL are both potentially trustworthy URLs, or whose referrerURL is a non-potentially trustworthy URL.
unsafe-urlSpecifies that a request’s full referrerURL is sent along for both same-origin-referrer requests and cross-origin-referrer requests.
srcURIURL for the audio stream
typeMIME typeMIME type of the content - default is text/javascript

Examples

1 · async

2 · charset

3 · crossorigin · anonymous

4 · crossorigin · use-credentials

5 · defer

6 · referrerpolicy · no-referrer

7 · referrerpolicy · no-referrer-when-downgrade

8 · referrerpolicy · origin

9 · referrerpolicy · origin-when-cross-origin

10 · referrerpolicy · same-origin

11 · referrerpolicy · strict-origin

12 · referrerpolicy · strict-origin-when-cross-origin

13 · referrerpolicy · unsafe-url

14 · src

15 · type