Performance: Table structure
MEDIUM IMPACT
Table structure affects page load speed and rendering performance by influencing DOM size and layout complexity.
<table><thead><tr><th>Item</th><th>Detail</th></tr></thead><tbody><tr><td>Item 1</td><td>Detail 1</td></tr><tr><td>Item 2</td><td>Detail 2</td></tr></tbody></table>
<table><tr><td>Item 1</td><td>Detail 1</td></tr><tr><td>Item 2</td><td>Detail 2</td></tr></table>
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Non-semantic table | Moderate DOM nodes | Multiple reflows per row | Higher paint cost due to layout complexity | [X] Bad |
| Semantic table with <thead>, <tbody>, <th> | Moderate DOM nodes | Single reflow after layout | Lower paint cost with optimized layout | [OK] Good |