DEV Community

loading...
Cover image for HTML tags | caption

HTML tags | caption

Carlos Espada
Frontend developer. Cyclist. Fan of trains, dinos and XIX century travels. Trying to do my part for making an accessible, light and fast internet for everyone.
・1 min read

It is used to insert a title in a table. It must be inserted just after <table>, like its first child.

You can control the rendering position visually with the caption-side CSS property (top/bottom).

If the table is the only descendant of a <figure>, use <figcaption> instead of <caption>.

  • Type: block
  • Self-closing: No
  • Semantic value: No

Definition | Example | Support

Discussion (0)