2.6 Block Elements
We’ll now introduce an element category that is not part of the HTML5 standard. The category is for block elements. Even though “block element” is not an official term blessed by the W3C, we’ll use it throughout the book because it will make certain explanations easier. A block element expands to fill the width of its container, so for a given container, there will be only one block element for each row in the container. For every example in the first part of this book, each block element’s container is the body element, which spans the width of the browser window. So for those examples, the block element also spans the width of the entire browser window. That’s different from a phrasing element in that (1) a phrasing element’s ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access