Tables and Grid Layout
suggest changeUse semantic table elements for tabular data:
<table>
<thead>
<tr>
<th scope="col">Product</th>
<th scope="col">Price</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">Notebook</th>
<td>$8</td>
</tr>
</tbody>
</table>
Do not replace this structure with nested div elements styled as display: table; doing so discards useful table semantics unless they are rebuilt with ARIA.
For non-tabular interface layout, use Grid:
.property-list {
display: grid;
grid-template-columns: max-content minmax(0, 1fr);
gap: 0.5rem 1rem;
}
Choose markup from the content's meaning and CSS from the visual layout it needs.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents