concept

block-layout — CSS reference

Ordinary block boxes are arranged along the block axis. Their inline sizes and margin behavior depend on the containing block, writing mode and formatting context. A block-level box is not necessarily a block container: flex and grid can be block-level too.

Formal Syntax & Structure

css syntaxcss
display: block;

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS flow layout lab</title><style>body {margin:0} .sample {background:#dcebe9;color:#182e32}body{font:16px/20px sans-serif} #p{width:240px;background:#e6eef2} .tile{background:#c2e4d5} #a,#b{box-sizing:content-box}#a,#b{height:30px}</style><body><div id="p"><div class="tile" id="a">First</div><div class="tile" id="b">Second</div></div></body></html>
CSS Reference