This example shows a neat table with a caption, header, body, and footer. It uses simple styling for clarity and accessibility with aria-label and scope attributes.
The second row cells <td>Book</td><td>$10</td> are not wrapped inside a <tr> tag, which is required.
Step 2: Validate table syntax
Each row must be inside <tr>. Missing it causes invalid structure.
Final Answer:
Missing <tr> tags around second row cells -> Option C
Quick Check:
Rows need <tr> tags [OK]
Hint: Every row's cells must be inside <tr> [OK]
Common Mistakes:
Omitting <tr> tags
Thinking <td> can be direct child of <table>
Confusing <th> and <td> usage
5. You want to create a table with a caption, a header row, a body with two rows, and a footer row. Which is the correct structure?
hard
A. <table><caption>Title</caption><thead><tr><td>H1</td></tr></thead><tbody><tr><td>B1</td></tr><tr><td>B2</td></tr></tbody><tfoot><tr><td>F1</td></tr></tfoot></table>
B. <table><thead><caption>Title</caption><tr><th>H1</th></tr></thead><tbody><tr><td>B1</td></tr><tr><td>B2</td></tr></tbody><tfoot><tr><td>F1</td></tr></tfoot></table>
C. <table><caption>Title</caption><tbody><tr><th>H1</th></tr><tr><td>B1</td></tr><tr><td>B2</td></tr></tbody><tfoot><tr><td>F1</td></tr></tfoot></table>
D. <table><caption>Title</caption><thead><tr><th>H1</th></tr></thead><tbody><tr><td>B1</td></tr><tr><td>B2</td></tr></tbody><tfoot><tr><td>F1</td></tr></tfoot></table>
Solution
Step 1: Confirm caption placement
The <caption> tag must be directly inside <table>, before <thead>.
Step 2: Check header, body, and footer tags
<thead> contains header row with <th>, <tbody> has two data rows, and <tfoot> has footer row.
Step 3: Validate cell tags in header
Header cells use <th>, not <td>.
Final Answer:
Correct structure: caption first, thead with th, tbody with two rows, tfoot -> Option D
Quick Check:
Caption + thead + tbody + tfoot correct order [OK]
Hint: Caption first, then thead, tbody, tfoot with proper cells [OK]
Common Mistakes:
Placing caption inside thead
Using <td> in header
Omitting tbody
Wrong tag order
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.