liveBook · Manning

Main

The HTML main element identifies the dominant content of a document or application view, excluding shared navigation and peripheral content.

How 3 Manning books explain it

Build a Website with ChatGPT

A main element is an HTML element that identifies the principal content of a document.

How it is used
Marks the page-specific content area while separating it from repeated header, navigation, and footer content.
How deep it goes
Defines main, limits it to one per page, and shows its usual placement; defers detailed HTML semantics.
Examples
Demonstrates main in home pages, book-club pages, journals, galleries, portfolios, articles, and course catalogs.
What you can do after
Apply it by requesting or writing page layouts that isolate unique content in one main element.

Read how Build a Website with ChatGPT explains main →

Web Design Playground, Second Edition

Main content is the primary subject matter of a web page, excluding shared navigation and peripheral regions.

How it is used
Marks the page area containing content unique to the current page.
How deep it goes
Defines placement and single-use rules, then applies main to gallery and portfolio layouts without detailing browser internals.
Examples
Uses a header-and-navigation layout, a thumbnail photo gallery, and a portfolio containing several sections.
What you can do after
Build it from scratch by wrapping page-specific content in one semantic main element.

Read how Web Design Playground, Second Edition explains main →

Web Design Playground

The primary content area of a page that carries the central information or purpose of the page.

How it is used
Marks the current page’s unique central content and provides a container for page-specific layouts.
How deep it goes
Defines semantic placement, nesting, and flexbox behavior, while stopping short of deeper accessibility guidance.
Examples
Uses personal-page text, article-and-sidebar layouts, and photo galleries containing linked, wrapping thumbnails.
What you can do after
Build it from scratch by placing unique content in <main> and arranging its regions with semantic HTML and flexbox.

Read how Web Design Playground explains main →

Related concepts

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.