CSS caption-side Property


This property is used to specify the position where the table caption is placed. It is used in HTML Tables. This property can be used with any element whose display property set to caption-side.

The caption-side property specifies the placement of a table caption.

CSS Syntax

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

Values

  • top: the default. Positions the caption at the top of the table.
  • bottom: positions the caption at the bottom of the table.
  • inherit: indicates that the value is inherited from the caption-side value of its parent

Example -