property-value

display/table — CSS reference

Generates a CSS table with a block-level outer wrapper and an internal table formatting context. CSS table display can create anonymous table boxes when the required structure is missing. Use semantic HTML table elements for tabular data.

Formal Syntax & Structure

css syntaxcss
display: table;

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}#p{display:table;width:180px;table-layout:fixed}#r{display:table-row}#a,#b{display:table-cell;width:90px;height:30px}</style><body><div id="p"><div id="r"><div id="a">A</div><div id="b">B</div></div></div></body></html>
CSS Reference