concept

Table grid box — CSS reference

The table grid box contains row groups, rows and cells, distinct from captions in the surrounding wrapper. The grid assigns each cell a position in row and column tracks. A cell spanning multiple columns occupies their combined grid area.

Formal Syntax & Structure

css syntaxcss
table { width: 200px; }

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>Table grid box</title><style>body{margin:0}#a{padding:8px;background:rgb(232,237,241);color:rgb(0,0,0);box-sizing:border-box}body{font:16px/20px sans-serif;background:white}#a{padding:0;background:transparent;margin:10px;color:black}table{border-spacing:0}td,th{padding:0}caption{padding:0}#a{width:200px;table-layout:fixed}td{height:30px}</style><body><table id="a"><tr><td id="x">A</td><td id="y">B</td></tr><tr><td id="z">C</td><td>D</td></tr></table></body></html>
CSS Reference