Recall & Review
beginner
What is the purpose of a <caption> element in an HTML table?
The <caption> element provides a title or description for the table, helping users understand its content. It improves accessibility and clarity.
Click to reveal answer
beginner
Where should the <caption> element be placed inside a table for correct HTML structure?
The <caption> element should be the first child inside the <table> element, before any <thead>, <tbody>, or <tfoot> sections.
Click to reveal answer
intermediate
How does Bootstrap style the <caption> element by default?
Bootstrap styles the <caption> with padding and a muted color, aligning it to the top-left by default to keep it visually distinct as a table title.
Click to reveal answer
intermediate
Can the <caption> element be placed below the table in HTML?
No, the <caption> element must be placed as the first child inside the <table>. Placing it below the table is invalid HTML and may cause accessibility issues.
Click to reveal answer
intermediate
Why is correct placement of <caption> important for screen readers?
Screen readers announce the <caption> first when reading a table, so placing it correctly ensures users hear the table's title or description before the data.
Click to reveal answer
Where should the <caption> element be placed inside a table?
✗ Incorrect
The must be the first child inside the element for valid HTML and accessibility.