concept

Anonymous table boxes — CSS reference

CSS table layout repairs missing required box relationships by inserting anonymous table boxes. Adjacent table-cell siblings under a block can share an anonymous row and table structure. These boxes are not DOM elements. Do not confuse CSS box fix-up with HTML parser insertion of tbody.

Formal Syntax & Structure

css syntaxcss
span { display: table-cell; }

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>Anonymous table boxes</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}span{display:table-cell;width:80px;height:30px}</style><body><div id="a"><span id="x">A</span><span id="y">B</span></div></body></html>
CSS Reference