liveBook · Manning

Block-level element

Also called block element

A block-level element is an HTML element that participates in block layout, typically starting on a new line and occupying the available width of its container.

How 2 Manning books explain it

CSS in Depth, Second Edition

A block-level element generates block-level content that starts on its own line and normally fills the available width of its container.

How it is used
Uses block-level behavior to predict page layout and stack links or form controls on separate lines.
How deep it goes
Defines default flow and works through spacing and input-width exceptions, without detailing browser layout internals.
Examples
Shows paragraphs and headers in a one-column page, stacked sidebar links, and block-displayed login inputs.
What you can do after
Apply it via CSS `display: block` to stack links or inputs, then adjust spacing or width where needed.

Read how CSS in Depth, Second Edition explains block-level element →

Tiny CSS Projects

A block-level element is an element that participates in block layout and ordinarily occupies the available width of its containing block.

How it is used
Uses block layout to make publication dates, card strips, and other interface regions occupy clear horizontal space.
How deep it goes
Defines default flow behavior and demonstrates changing inline behavior with display: block, but does not detail block formatting internals.
Examples
Uses a styled publication date, an empty magnetic-strip div, and an inline-flex social-sharing container as contrasting examples.
What you can do after
Apply it via CSS by selecting display values that control whether an element occupies a line and the available horizontal space.

Read how Tiny CSS Projects explains block-level element →

Also covered in

What to know first

Related concepts

Questions about block-level element

What is block-level element?

A block-level element is an HTML element that participates in block layout, typically starting on a new line and occupying the available width of its container.

Which Manning books explain block-level element?

CSS in Depth, Second Edition and Tiny CSS Projects.

What should I know before learning block-level element?

Manning books that teach block-level element usually introduce display property and div first.

What is the difference between block-level element and inline container?

A block-level element is an HTML element that participates in block layout, typically starting on a new line and occupying the available width of its container. An inline container is an HTML element that participates in inline layout, flowing with surrounding content and potentially wrapping within its containing block.

What kinds of block-level element are there?

Kinds of block-level element include div.

What is block-level element part of?

Block-level element is part of BEM. BEM, or Block-Element-Modifier, is a CSS naming methodology that organizes classes around reusable blocks, their elements, and their modifiers.

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.