CSS caption-side property

Definition and Usage

The caption-side property sets the position of the table title.

Description

This property specifies the placement position of the table title relative to the table frame. The table title is displayed as if it is a block-level element before (or after) the table.

See also:

CSS Tutorial:CSS Tables

HTML DOM Reference Manual:captionSide Property

Example

Specifies the placement style of the table title:

caption
  {
  caption-side:bottom;
  }

Try it yourself

CSS Syntax

caption-side: top|bottom|initial|inherit;

Property Value

Value Description
top Default Value. Position the table title above the table.
bottom Position the table title below the table.
inherit Specifies that the caption-side property should inherit its value from the parent element.

Technical Details

Default Value: top
Inheritance: yes
Version: CSS2
JavaScript Syntax: object.style.captionSide="bottom"

More examples

Set the position of the table title
This example demonstrates how to locate the table title.

Browser support

The numbers in the table indicate the first browser version that fully supports this property.

Chrome IE / Edge Firefox Safari Opera
1.0 8.0 1.0 1.0 4.0

Note:If !DOCTYPE has been specified, Internet Explorer 8 (and higher versions) support the caption-side property.