CSS caption-side Property

Beginner
4 min read
Updated: Oct 2026
3 examples
Live preview

Definition and Usage

The caption-side property places a table’s <caption> on the block-start or block-end side of the table. In horizontal left-to-right writing, that means above (top) or below (bottom).

It applies to table-caption elements and is inherited. The initial value is top. Placement follows the table’s writing-mode.

Unsupported logical values.

The spec also defines inline-start and inline-end, but no browsers support them yet. Use top and bottom only.

CSS Syntax

syntax.css
caption-side: top | bottom | initial | inherit;

Property Values

ValueDescriptionTry it
topDefault. Places the caption at the block-start side of the tableTry it
bottomPlaces the caption at the block-end side of the tableTry it
initialResets to topTry it
inheritTakes the parent’s caption-sideTry it

How to Use caption-side

Add a real <caption>, then choose top or bottom.

  1. Put a <caption> inside the <table> (usually as the first child).
  2. Write a clear caption that names the table’s purpose.
  3. Set caption-side: top for a title, or bottom for a source note or footnote.
  4. Optional: set the property on the table — it inherits to the caption.
PieceRequired?Role
<table>YesThe table box the caption is tied to
<caption>YesThe element caption-side positions
caption-side keywordYestop or bottom

Live Preview

Toggle caption-side on a small data table. Watch the caption move above or below the rows.

Default is top. Choose bottom when the caption is a note under the data.

Table
Famous animals
NameLocation
GiraffeAfrica
PenguinAntarctica
TigerAsia

caption-side: top

CSS Examples

Each snippet focuses on caption-side. Use Try It Yourself for a live editor.

Example 1 — Caption Above the Table

Use the default side to title the table.

CSS
<style>
  caption {
    caption-side: top;
  }
</style>

<table>
  <caption>Team scores</caption>
  <tr><th>Team</th><th>Points</th></tr>
  <tr><td>A</td><td>12</td></tr>
  <tr><td>B</td><td>9</td></tr>
</table>
Try It Yourself

How It Works

  1. Add a caption. The <caption> names the table for everyone, including assistive tech.
  2. Set top. caption-side: top places it at the block-start side (above in LTR).
  3. Default behavior. Skipping the property still places the caption on top.
  4. Keep it short. A clear title beats a long sentence above the data.

Example 2 — Caption Below the Table

Put a source note or footnote under the data.

CSS
<style>
  caption {
    caption-side: bottom;
  }
</style>

<table>
  <caption>Source: internal report 2026</caption>
  <tr><th>Item</th><th>Count</th></tr>
  <tr><td>Apples</td><td>4</td></tr>
  <tr><td>Pears</td><td>2</td></tr>
</table>
Try It Yourself

How It Works

  1. Set bottom. caption-side: bottom moves the caption to the block-end side.
  2. Caption still first in HTML. Keep <caption> as the first child of the table; CSS only changes where it is drawn.
  3. Good for notes. Source lines and footnotes often read better under the data.
  4. One caption. A table should have a single <caption>.

Example 3 — Set on the Table (Inherit)

Because the property is inherited, setting it on the table is enough.

CSS
<style>
  table {
    caption-side: bottom;
  }
</style>

<table>
  <caption>Monthly totals</caption>
  <tr><th>Month</th><th>Total</th></tr>
  <tr><td>Jan</td><td>10</td></tr>
  <tr><td>Feb</td><td>14</td></tr>
</table>
Try It Yourself

How It Works

  1. Set on table. caption-side on the table is inherited by the caption.
  2. Same result. The caption still ends up below the table with bottom.
  3. Handy for many tables. One rule on a shared table class can position every caption.
  4. Override when needed. A more specific rule on caption can still change one table.

Edge Cases & Pitfalls

Most issues come from missing captions or unsupported values.

html

Needs a real <caption>

caption-side only positions a caption element. A styled <p> above the table is not a caption.

order

Keep caption first in the markup

Put <caption> as the first child of <table>. CSS moves where it is drawn, not where it belongs in the document.

logical

inline-start / inline-end are unsupported

Those values exist in the logical properties module, but browsers do not implement them. Use top and bottom.

writing

Sides follow writing-mode

top and bottom are block edges. With a vertical writing-mode, those edges are not the same as “above” and “below” on screen.

a11y

Caption text still matters most

Position helps layout. A meaningful caption helps people understand the table. Empty captions help no one.

Browser Support

caption-side is a browser table layout property. Node.js, Deno, and Bun do not apply it.

✓ Baseline · Widely available

caption-side

top and bottom: Chrome 1+, Firefox 1+, Safari 1+, Edge 12+, IE 8+. Logical inline values are not supported.

99% top / bottom
Google Chrome 1+
Full
Mozilla Firefox 1+
Full
Apple Safari 1+
Full
Microsoft Edge 12+
Full
Opera Supported
Full
Samsung Internet Supported
Full
Internet Explorer 8+
Full
caption-side Widely supported

Bottom line: Safe to use top and bottom everywhere. Skip inline-start and inline-end until browsers catch up.

Key Takeaways

  • Role: place a table caption at the block-start (top) or block-end (bottom) side.
  • Common values: top and bottom.
  • Initial value: top. Inherited. Applies to table-caption elements.
  • Accessibility: use a real, meaningful <caption> — position alone is not enough.

One line: caption-side puts the table caption above or below — top by default, bottom when you want a note under the data.

Frequently Asked Questions

It places a table's caption above or below the table box. Use top for a title above the table, or bottom for a note below it.
The initial value is top, so the caption sits at the block-start side of the table by default.
It applies to table-caption elements (the HTML caption inside a table). Because it is inherited, you can also set it on the table.
top puts the caption at the block-start edge of the table. bottom puts it at the block-end edge. In horizontal left-to-right writing, that means above and below.
Those logical values are defined in CSS Logical Properties, but browsers do not support them yet. Stick to top and bottom.
It is Baseline and widely available: Chrome 1+, Firefox 1+, Safari 1+, Edge 12+. It is a browser layout property, not a Node.js feature.

Next: caret-color

Learn how to change the color of the text input caret.

caret-color tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful