The caption-side property controls where a table caption appears — above or below the table. It helps you label data clearly and improve table readability and accessibility.
01
Caption Placement
Top or bottom of table.
02
Syntax
top, bottom, inherit.
03
caption Tag
Works with HTML tables.
04
Default top
Caption above table.
05
Styling
Pair with font rules.
06
Accessibility
Describe table purpose.
Fundamentals
Definition and Usage
The caption-side CSS property controls the placement of table captions. It lets you specify whether the caption should appear at the top or the bottom of a table.
This property is particularly useful for enhancing the readability and accessibility of table data by clearly labeling the table’s purpose or contents. Use it with the HTML <caption> element inside a <table>.
💡
Beginner Tip
Most tables use caption-side: top (the default) so users see the title before the data. Use bottom when the caption reads like a footnote or data source note.
Foundation
📝 Syntax
Apply caption-side to the <caption> element or with a caption selector:
syntax.css
caption{caption-side:top | bottom;}
Basic Example
caption-side.css
caption{caption-side:bottom;}
Syntax Rules
The initial value is top.
Applies to table caption elements.
Only affects tables that include a <caption> element.
The property is inherited, so you can set it on a parent and use inherit on captions.
Style the caption text separately with font-weight, color, and text-align.
Cheat Sheet
⚡ Quick Reference
Question
Answer
Initial value
top
Applies to
Table caption elements
Inherited
Yes
Animatable
No
Common use
Position table titles and source notes
Reference
💎 Property Values
The caption-side property accepts keyword values that control vertical caption placement.
Value
Example
Meaning
top
caption-side: top;
Places the caption above the table. This is the default value.
bottom
caption-side: bottom;
Places the caption below the table.
inherit
caption-side: inherit;
Inherits the caption-side value from the parent element.
top — above (default)bottom — below
HTML
The caption Element
Every styled caption starts with correct HTML structure. Place <caption> as the first child inside <table>:
Then use caption-side in CSS to move the caption above or below the table box. The caption text itself should describe what the table contains — not just repeat column headers.
Preview
👀 Live Preview
Compare the default top placement with bottom on otherwise identical tables.
caption-side: top
Sales by region
Region
Total
North
$4,200
South
$3,800
caption-side: bottom
Source: Q1 report
Region
Total
North
$4,200
South
$3,800
Hands-On
Examples Gallery
Try bottom captions, default top placement, styled captions, and per-table positioning.
📋 Caption Placement
Switch between top and bottom placement — starting with the reference example that puts the caption below the table.
Example 1 — Caption at the Bottom
Place the caption below the table using caption-side: bottom.
caption-bottom.html
<style>caption{caption-side:bottom;}</style><tableborder="1"><caption>This is a table caption</caption><tr><th>Header 1</th><th>Header 2</th></tr><tr><td>Data 1</td><td>Data 2</td></tr></table>
The caption renders below the table border box instead of above it. The HTML still places <caption> first in the markup — CSS controls the visual position.
Example 2 — Caption at the Top (Default)
Explicitly set caption-side: top for a standard title-above-table layout.
Scoping rules to table wrapper classes lets one page mix title-style top captions and footnote-style bottom captions.
A11y
♿ Accessibility
Always use a caption — Screen readers announce the caption to give context before reading cell data.
Write descriptive text — Explain what the table shows, not just “Table 1.”
Placement is visual — Moving the caption with CSS does not change reading order for assistive technology in most browsers; the caption remains associated with the table.
Do not rely on color alone — Caption styling should remain readable with sufficient contrast.
🧠 How caption-side Works
1
You add a caption element
Include <caption> inside the table with meaningful descriptive text.
HTML structure
2
You set caption-side in CSS
Choose top or bottom to control vertical placement.
CSS rule
3
The browser positions the caption box
The caption is rendered above or below the table grid while staying part of the table structure.
Table layout
=
📋
Clear table labeling
Users immediately understand what the table data represents.
Compatibility
Universal Browser Support
The caption-side property is widely supported across all modern browsers, including Chrome, Firefox, Safari, Edge, and Opera.
✓ Baseline · All browsers
Dependable caption placement everywhere
Chrome, Firefox, Safari, Edge, and Opera all support caption-side: top and bottom.
99%Universal support
Google Chrome1+ · Desktop & Mobile
Full support
Mozilla Firefox1+ · Desktop & Mobile
Full support
Apple Safari1+ · macOS & iOS
Full support
Microsoft Edge12+ · All versions
Full support
Opera4+ · Modern versions
Full support
caption-side property99% supported
Bottom line: Use caption-side freely for table captions. It is one of the most reliable table-related CSS properties.
Wrap Up
Conclusion
The caption-side property is a useful tool for controlling the placement of table captions. By specifying whether the caption should appear at the top or the bottom of the table, you can enhance the readability and organization of your table data.
Experiment with this property to see how it can improve the presentation of your tables — especially when pairing top captions with titles and bottom captions with source notes.
Style captions for readability with font-size and color
Write captions that describe the table’s purpose
❌ Don’t
Skip the caption and rely only on nearby headings
Use vague caption text like “Table” or “Data”
Assume caption-side replaces proper table headers
Hide captions visually while leaving empty caption tags
Forget that caption-side only works on table caption elements
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about caption-side
Use these points when labeling your next data table.
5
Core concepts
📋01
Caption Position
Top or bottom of table.
Purpose
⬆02
top Default
Caption above table.
Default
⬇03
bottom Value
Caption below table.
Keyword
📝04
caption Tag
Required HTML element.
HTML
♿05
Accessible
Describe table data.
A11y
❓ Frequently Asked Questions
caption-side controls whether a table caption appears above or below the table. It positions the caption element relative to the table box.
The initial value is top, which places the caption above the table by default.
It applies to table caption elements — the HTML caption tag inside a table. You can also target caption with a CSS selector.
top places the caption above the table headers and data rows. bottom places the caption below the entire table, which can work well for source notes or footnotes.
Yes. A visible, well-placed caption helps all users understand the table purpose. Always use a meaningful caption element rather than relying on caption-side alone for context.