Which tag is used to add a caption to a table?

Prepare for your Web Design EOPA Test. Study with flashcards and multiple choice questions, each question has hints and explanations. Get ready for your exam!

Multiple Choice

Which tag is used to add a caption to a table?

Explanation:
The caption element is used to add a caption to a table. Placing it as the first child of the table provides a textual label for the table that screen readers announce, improving accessibility. By default, browsers render the caption above the table, though you can position it with CSS if needed. The table element itself defines the grid of rows and cells; figcaption is meant for figures (like images) tied to a figure container, and legend is used with fieldsets in forms. So the caption element is the correct choice because it specifically labeled a table and carries semantic meaning for accessibility and document structure.

The caption element is used to add a caption to a table. Placing it as the first child of the table provides a textual label for the table that screen readers announce, improving accessibility. By default, browsers render the caption above the table, though you can position it with CSS if needed. The table element itself defines the grid of rows and cells; figcaption is meant for figures (like images) tied to a figure container, and legend is used with fieldsets in forms. So the caption element is the correct choice because it specifically labeled a table and carries semantic meaning for accessibility and document structure.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy