DEV Community

Cover image for HTML tags | caption
Carlos Espada
Carlos Espada

Posted on • Edited on

HTML tags | caption

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 and example | Support

Top comments (0)

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay