<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/the-caption-element-u1nmjcxqg" -->

---
title: The caption element | daily.dev
description: The HTML <caption> element is used for labeling tables and plays a crucial role in web accessibility. Unlike the <summary> attribute which provides non-visible...
canonical: https://daily.dev/posts/the-caption-element-u1nmjcxqg
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: The caption element | daily.dev
og:description: The HTML <caption> element is used for labeling tables and plays a crucial role in web accessibility. Unlike the <summary> attribute which provides non-visible...
og:url: https://daily.dev/posts/the-caption-element-u1nmjcxqg
og:image: https://api.daily.dev/og/posts/u1NmJCXqG.png
og:image:alt: The caption element
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# The caption element

**[HeydonWorks](https://daily.dev/sources/heydonworks)** · 4 min read · 1 upvotes · 0 comments

## Summary

The HTML <caption> element is used for labeling tables and plays a crucial role in web accessibility. Unlike the <summary> attribute which provides non-visible descriptions, the <caption> element is directly associated with tables, improving the experience for screen reader users. The CSS property caption-side can adjust the positioning of captions, but may affect accessibility if visual and source orders conflict. Best practices suggest using headings with captions to enhance user experience, particularly for screen reader users.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://heydonworks.com/article/the-caption-element/>

---

Tags: [#webdev](https://daily.dev/tags/webdev), [#css](https://daily.dev/tags/css), [#html](https://daily.dev/tags/html), [#accessibility](https://daily.dev/tags/accessibility)

[View this post on daily.dev](https://daily.dev/posts/the-caption-element-u1nmjcxqg)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"The caption element","url":"https://daily.dev/posts/the-caption-element-u1nmjcxqg","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/the-caption-element-u1nmjcxqg"},"datePublished":"2025-05-20T10:03:15.339Z","dateModified":"2025-05-20T10:03:30.008Z","description":"The HTML \u003ccaption\u003e element is used for labeling tables and plays a crucial role in web accessibility. Unlike the \u003csummary\u003e attribute which provides non-visible...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/279b7f6719a7a4c526a8b09b83779020?_a=AQAEuj9","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/279b7f6719a7a4c526a8b09b83779020?_a=AQAEuj9","isAccessibleForFree":true,"articleSection":"HeydonWorks","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"HeydonWorks","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/a5e1dea206ef49538e126393df63dc29","url":"https://daily.dev/sources/heydonworks"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/the-caption-element-u1nmjcxqg","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"webdev,css,html,accessibility","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"HeydonWorks","item":"https://daily.dev/sources/heydonworks"},{"@type":"ListItem","position":3,"name":"The caption element"}]}
```

