Chapter 6. The CSS Box Model

<feature><title>What You’ll Learn in This Hour:</title>
  • How web content is displayed visually in CSS as boxes

  • What categories of display elements are used and how you can affect an element’s display type

  • How CSS browsers interpret and display web pages

  • How to set margins, borders, and padding on a box

This hour explores the core of Cascading Style Sheets—the part of the specification that defines how parts of a web page are displayed: as stacks of boxes. The visual presentation of CSS is defined as a series of boxes based on the structure of the original document.

</feature>

Displaying Content in CSS

The content of a web page is the information encoded within the HTML page, found between the opening and closing tags of ...

Get Sams Teach Yourself CSS 24 in Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.