Css Caption Property is used to where you want to place the caption on the table. If you have the table and you give the Caption title in the table Default it will available at the top of the table. If you want to place the Caption bottom you can use this property.
The caption has four values.
- Initial
- Inherit
- Top
- Bottom
caption{ caption-side: bottom; }Example: CSS:
table caption{ caption-side:top; }HTML:
<table> <caption>Title</caption> <tr><td>One</td><td>One</td></tr> <tr><td>Two</td><td>Two</td></tr> </table>Output: For Bottom Property.
table caption{ caption-side:bottom; }
One | One |
Two | Two |
table caption{ caption-side:top; }
One | One |
Two | Two |
Feature | Chrome | Firefox | IE | Opera | Safari |
---|---|---|---|---|---|
Basic support | 1.0+ | 1.0+ | 8.0+ | 4.0+ | 1.0+ |