Tables
Tools for setting where a caption element appears relative to the table it belongs to.
| Class | Styles |
|---|---|
| caption-top | caption-side: top; |
| caption-bottom | caption-side: bottom; |
Reach for the caption-top utility when you want the caption to rest above your table:
| Wrestler | Signature Move(s) |
|---|---|
| "Steel" Vincent Marlowe | Iron Piledriver, Reverse Suplex Drop |
| "The Cliff" Ronan Frost | The Sky Cyclone |
| Vic Thunder | Vic's Bolt, Comet Slam Drop |
<table> <caption class="caption-top"> Table 3.1: Arena champions and their trademark finishing moves. </caption> <thead> <tr> <th>Wrestler</th> <th>Signature Move(s)</th> </tr> </thead> <tbody> <tr> <td>"Steel" Vincent Marlowe</td> <td>Iron Piledriver, Reverse Suplex Drop</td> </tr> <tr> <td>"The Cliff" Ronan Frost</td> <td>The Sky Cyclone</td> </tr> <tr> <td>Vic Thunder</td> <td>Vic's Bolt, Comet Slam Drop</td> </tr> </tbody></table>Apply the caption-bottom utility to drop a caption element to the bottom of a table:
| Grappler | Finishing Move(s) |
|---|---|
| "Ironhide" Marcus Steele | Ironhide Stunner, Steele Vice Press |
| Dane "The Cyclone" Vox | The Sky Cyclone |
| Vic Thunder | Vic's Bolt, Comet Slam Drop |
<table> <caption class="caption-bottom"> Table 3.1: Star grapplers and their signature finishing moves. </caption> <thead> <tr> <th>Grappler</th> <th>Finishing Move(s)</th> </tr> </thead> <tbody> <tr> <td>"Ironhide" Marcus Steele</td> <td>Ironhide Stunner, Steele Vice Press</td> </tr> <tr> <td>Dane "The Cyclone" Vox</td> <td>The Sky Cyclone</td> </tr> <tr> <td>Vic Thunder</td> <td>Vic's Bolt, Comet Slam Drop</td> </tr> </tbody></table>Pair a caption-side utility with a breakpoint variant such as md: so it only takes effect from medium screen sizes and up:
<caption class="caption-top md:caption-bottom ..."> <!-- ... --></caption>Dig deeper into working with variants in variant reference docs.