liveBook · Manning

Script element

Also called script tag

A script element is an HTML element that embeds script content or references an external script resource for processing by a browser.

How 3 Manning books explain it

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.

Read how Web Components in Action explains script element →

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 →

Also covered in

What to know first

Related concepts

Questions about script element

What is script element?

A script element is an HTML element that embeds script content or references an external script resource for processing by a browser.

Which Manning books explain script element?

Web Components in Action, D3.js in Action, Third Edition and Secrets of the JavaScript Ninja, Second Edition.

What should I know before learning script element?

Manning books that teach script element usually introduce HTML, JavaScript, CSS and Document Object Model first.

What is the difference between script element and same-origin policy?

A script element is an HTML element that embeds script content or references an external script resource for processing by a browser. The same-origin policy is a browser security mechanism that restricts how scripts and documents interact with resources from origins that differ in scheme, host, or port.

What is script element part of?

Script element is part of HTML. HTML is the standard markup language for structuring content and elements in documents on the web.

What is script element also called?

Script element is also called script tag.

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.