Script element
A script element is an HTML element that embeds executable script code or references an external script resource.
Web Components in Action
An HTML element that embeds executable code or references an external script file for a document.
- How it is used
- Loads external JavaScript for Web Components while keeping HTML documents manageable.
- How deep it goes
- Demonstrates single and multiple references, production concatenation, and dependency reduction without explaining script execution timing.
- Examples
- Uses a photo carousel, development HTML with many component references, and a production build.js reference.
- What you can do after
- Apply it via HTML to load component code and organize development or production dependencies.
D3.js in Action, Third Edition
A script element, or script tag, is an HTML element that embeds executable code or references an external script file.
- How it is used
- Loads D3 and application JavaScript into an HTML page before DOM manipulation begins.
- How deep it goes
- Explains external loading, dependency order, placement, and module alternatives, but not script-element parsing internals.
- Examples
- Uses D3 v7, main.js, index.html, d3.select(), and a title whose color changes through D3.
- What you can do after
- Operate/configure HTML files to load D3 before JavaScript that depends on it.
Read how D3.js in Action, Third Edition explains script element →
Secrets of the JavaScript Ninja, Second Edition
An HTML element whose content or referenced resource contains executable script code.
- How it is used
- Triggers JavaScript execution during page construction, alternating with HTML parsing and DOM building as needed.
- How deep it goes
- Describes the element’s role in page construction but gives no syntax or loading details.
- Examples
- Uses a diagram showing page building alternate between HTML parsing, DOM construction, and JavaScript execution.
- What you can do after
- Understand how encountering the element fits JavaScript execution into browser page construction.
Read how Secrets of the JavaScript Ninja, Second Edition explains script element →
Related concepts
- Document Object Modeluses · The Document Object Model (DOM) is a standard programming interface that represents a document as a structured tree of objects and provides ways to access and modify its content and structure.
- JavaScriptuses · JavaScript is a high-level, dynamically typed, multi-paradigm programming language standardized as ECMAScript and used for web and general-purpose programming.
- HTMLpart of · HTML (HyperText Markup Language) is the standard markup language for structuring content and elements in web documents.
- modulealternative to · A module is a distinct, bounded software unit that groups related code or functionality and provides an organizational or interaction boundary within a larger system.
- D3.jsuses · D3.js is an open-source JavaScript library for binding data to documents and creating dynamic, interactive visualizations in web browsers.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


