Performance: Table caption placement
MEDIUM IMPACT
This affects the visual stability and rendering speed of tables by controlling when and how captions are displayed.
<table>
<caption>Monthly Sales</caption>
<tbody>
<tr><td>Data</td></tr>
</tbody>
</table><table>
<caption>Monthly Sales</caption>
<tbody>
<tr><td>Data</td></tr>
</tbody>
</table>| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Caption inside <tbody> | Invalid DOM structure | Multiple reflows due to layout shifts | Higher paint cost from re-painting shifted content | [X] Bad |
| Caption directly inside <table> | Valid DOM structure | Single reflow on load | Minimal paint cost with stable layout | [OK] Good |