Css Caption Property

Css Caption Property
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



First two values are default value in the CSS. Top and Bottom are the Real value of the CSS Caption Property. The top will place the Table Caption at the Top. The bottom will place the table caption at the Bottom of the table. Syntax:
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;
}
Title
OneOne
TwoTwo
Output: For Top Property.
table caption{
caption-side:top;
}
Title
OneOne
TwoTwo
Feature Chrome Firefox IE Opera Safari
Basic support 1.0+ 1.0+ 8.0+ 4.0+ 1.0+
Copyright Labw3