Extension & Emerging Attributes

language

Obsolete script attribute identifying a scripting language. The narrow legacy JavaScript spelling may still be conforming under particular conditions, but authors should omit it for classic JavaScript; use type="module" for module scripts. Do not confuse it with the global lang attribute.

Formal Syntax & Structure

html syntaxhtml
<script language="JavaScript">…</script>

Parameters & Attributes

NameTypeDescription
languagestringHistorical script language selection.

Working Example

Example Snippethtml
<p id="message"></p><script>  document.getElementById("message").textContent="Script loaded";</script>
HTML Reference