Little Web Hut

CSS 2.1 Reference: caption-side Property

CSS caption-side Property
Syntax
selector {caption-side: value;}
  • value is specified by using one of the following keywords: top, bottom, or inherit.
Usage

The caption-side property is used to specify whether a table caption should be positioned above or below the associated table.

This property is specified by using a keyword according to the syntax shown above.


CSS Example: The caption-side property is set to bottom.
  caption {caption-side: bottom;
           display: table-caption;
  }
Test It HTML StyleTest It XHTML StyleTest It HTML5 Style

Keywords
  • top - The caption is positioned above the table.
  • bottom - The caption is positioned below the table.
  • inherit - The inherit keyword is used to specify that the value for this property should be taken from the parent element. If inherit is used with the root element, then the initial value for this property will be used.
Applies To Elements that have a display property value of table-caption.
Inherited Yes
Initial Value top


caption-side Property Examples
Test It HTML StyleTest It HTML StyleTest It HTML5 StyleThe caption-side property is set to bottom.