property
Caption side — CSS reference
Positions the caption box on the selected side of the table grid. Use a semantic caption for a concise description of the data. Changing the visual placement does not change the HTML association. This fixture verifies bottom rather than newer logical values.
Formal Syntax & Structure
css syntaxcss
caption-side: bottom;Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>caption-side</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{caption-side:bottom}td,th{width:80px;height:25px}</style><body><table id="a"><caption>Inventory</caption><tbody><tr><th scope="col" id="x">Item</th><th scope="col" id="y">Qty</th></tr><tr><td id="z">Pen</td><td>5</td></tr></tbody></table></body></html>