B.21. caption-side

This property lets you specify the side of a table on which its caption (specified with the <caption> tag) should appear.

Inherited: Yes

B.21.1. Value

Any of the following constants: top, bottom, left, or right.

Initial value: top

B.21.2. Compatibility

CSS Version: 2

Works in Internet Explorer 5 for Macintosh, Netscape 6 or later, and Mozilla browsers. The values left and right do not yet work in most browsers.

B.21.3. Example

This style rule places captions at the bottom of all tables that occur within other tables.

table table {
  caption-side: bottom;
}

Get HTML Utopia: Designing Without Tables Using CSS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.