Challenge - 5 Problems
Table Caption Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ rendering
intermediate2:00remaining
Where does the caption appear in this Bootstrap table?
Given this Bootstrap table code, where will the caption appear visually in the browser?
Bootsrap
<table class="table"> <caption>Monthly Sales Data</caption> <thead> <tr><th>Month</th><th>Sales</th></tr> </thead> <tbody> <tr><td>January</td><td>$1000</td></tr> <tr><td>February</td><td>$1200</td></tr> </tbody> </table>
Attempts:
2 left
💡 Hint
Think about the default position of the element in HTML tables.
✗ Incorrect
By default, the element appears above the table and is left-aligned in Bootstrap tables unless styled otherwise.
❓ selector
intermediate2:00remaining
Which CSS selector targets the table caption in Bootstrap?
You want to style the caption text of a Bootstrap table. Which CSS selector correctly targets the caption element?
Attempts:
2 left
💡 Hint
Remember the caption is a child element of the table.
✗ Incorrect
The selector 'table > caption' targets caption elements that are direct children of a table, which is the correct way to style table captions.
🧠 Conceptual
advanced2:00remaining
What is the effect of placing inside in a Bootstrap table?
Consider this HTML snippet:
What happens to the caption placement and rendering?
| Q1 | Q2 |
|---|---|
| 100 | 150 |
Attempts:
2 left
💡 Hint
Check HTML specification for allowed children of .
✗ Incorrect
The element must be a direct child of . Placing it inside is invalid HTML, so browsers ignore it and do not display the caption.