Search within TutorialsPark

CSS caption-side Property


To Specify location of the caption Element


Definition and Notes.

1. The CSS caption-side property when used with a table determines whether the caption appears at the top or bottom of the table. By default, the <caption> element immediately follows the opening <table> tag, and appears at the top of table

2. The caption is displayed as if it were a block-level element just placed before or after the table

Syntax:

CSS caption-side property. internetexplorer safari firefox opera chrome

View in Splitscreen»

Code-Editor:

Note-You can define caption-side property in the style rule for the table or in a seperate rule for the caption itself.

Property Values

Value Description
bottom To place the caption under the table
top To place the caption above the table. This is the default Value
inherit The element takes the value of caption-side from its parent element

Specifications

Specs Value
Name caption
Value top | bottom | inherit
Initial Value top
Applies to Elements with a display of table-caption
Javascript syntax object.style.captionSide="top"
Inherited Yes
Computed Value Same as declared value.
Browser Support internetexplorer safari firefox opera chrome

Related Examples.