liveBook · Manning

Body element

As explained in Build a Website with ChatGPT

The body element is the HTML element containing a document's displayed content.

The body element is the HTML element that contains a document’s displayed content. CSS applied to it can set broad page styles, such as the background and text colors. section 8.6

Customize the body element by changing:

  • The background-color value to give the page a different background. section 8.6 section 9.6
  • The color value to change the page’s text color; update related button and footer border colors to keep the design harmonious. section 8.6
  • Font, padding, margin, and maximum-width values to adjust the page’s size and spacing while keeping the px unit where required. section 8.6 section 9.6

Changing a page background

In an event sign-up or recipe page, replace the body element’s background-color value with another color keyword. For more accessible sizing, consider converting px measurements to rem; by default, 1 rem equals 16 px. section 8.6 section 9.6

How Build a Website with ChatGPT covers it

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.
How it connects
Connects the body element with CSS properties, rem units, and HTML elements such as header, footer, and form controls.

Also explained in

Compare how 2 books explain body element →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build a Website with ChatGPT. The section links point to the parts of the book it draws on.