<script>

noun

say it: “SKRIPT” /skrɪpt/ or “SKRIPT tag” /ˈskrɪpt tæɡ/

The HTML element that adds JavaScript to a page, either written inside it or loaded from a file with src. It can also hold data, such as JSON-LD.

What is <script>?

<script> — The element that embeds or references executable code or data.

In a sentence

  • “The <script> near the top of the page loads cart.js.”
  • “I loaded the menu's JavaScript with a script tag that has the defer attribute, so the page shows before it runs.”
  • “The page's opening hours sit in a script tag with type application/ld+json, where search engines read them.”

Level: Journeyman · More HTML terms at this level

Updated