Body element
The HTML body element contains the main content of a document that is rendered in a browser.
Web Design Playground, Second Edition
A body element is the HTML document component that contains the page content rendered in the web browser.
- How it is used
- Places page text and HTML tags where the browser displays the site’s visible content.
- How deep it goes
- Defines opening and closing tags, distinguishes body from head, and demonstrates visible text while deferring whitespace and paragraph behavior.
- Examples
- Uses a minimal HTML page containing “Hello HTML World!” to connect body content with its visible browser result.
- What you can do after
- Build it from scratch by placing visible text and HTML elements inside the body element.
Read how Web Design Playground, Second Edition explains body element →
Build a Website with ChatGPT
The body element is the HTML element containing a document's displayed content.
- How it is used
- Uses the body element as a page-wide styling target for background and text color.
- How deep it goes
- Covers practical CSS customization and stops short of explaining the element’s HTML structure in detail.
- Examples
- Demonstrates background-color changes on event sign-up and recipe pages.
- What you can do after
- Apply it via CSS by changing page colors, width, spacing, and measurement units.
Read how Build a Website with ChatGPT explains body element →
Related concepts
- HTML elementpart of · An HTML element is a component of an HTML document, defined by markup and represented in the document structure, with permitted attributes, content, and semantics.
- paragraph elementhas part · An HTML paragraph element is a p element representing a distinct block of related text.
- style propertyconfigured by · A style property is a named setting or interface attribute that specifies or exposes a presentation characteristic of an element or view.
- flex containerconfigures · A flex container is an element whose children are laid out as flex items according to the CSS Flexible Box Layout model.
- HTMLpart of · HTML (HyperText Markup Language) is the standard markup language for structuring content and elements in web documents.
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.

