CSS caption-side
property specifies where the caption of a table should be placed. The table caption can either be placed at the top or bottom of the table. See implementation in the example below:
Example:
.table1{ caption-side: top; } .table2{ caption-side: bottom; }
CSS Syntax
The caption-side
property has the below syntax:
caption-side: top|bottom|initial|inherit;
Property Values
The caption-side
property accepts the following values:
top | This is the default value. The caption is placed just above the table. |
bottom | The caption is placed just below the table. |
initial | Sets the caption-side property to its default value(top). |
inherit | Inherits the caption-side property from the parent element. |
General Info
Default Value | top |
Inherited | Yes |
JavaScript Usage | element.style.captionSide = “bottom”; |