Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to start a table in HTML.
HTML
<table[1]> <tr> <td>Cell 1</td> </tr> </table>
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using CSS styles instead of the border attribute for this simple example.
Forgetting to add any attribute, so the table has no visible border.
✗ Incorrect
The border="1" attribute adds a simple border to the table, making it visible.
2fill in blank
mediumComplete the code to add a header cell in the table row.
HTML
<table border="1"> <tr> [1]>Name</th> </tr> </table>
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using
<td> instead of <th> for header cells.Using tags like
<header> or <head> inside the table.✗ Incorrect
The <th> tag defines a header cell in a table row.
3fill in blank
hardFix the error in the table row by completing the missing closing tag.
HTML
<table border="1"> <tr> <td>Item 1</td> <td>Item 2[1] </tr> </table>
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Closing the row instead of the cell.
Closing the table instead of the cell.
✗ Incorrect
Each table cell <td> must be properly closed with </td>.
4fill in blank
hardFill both blanks to create a table with a header and two data rows.
HTML
<table border="1"> <tr> <[1]>Name</[1]> <[1]>Age</[1]> </tr> <tr> <[2]>Alice</[2]> <[2]>30</[2]> </tr> </table>
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using
td for headers.Using
th for data cells.✗ Incorrect
The first row uses <th> for headers, and the second row uses <td> for data cells.
5fill in blank
hardFill all three blanks to create a table with a caption, header, and one data row.
HTML
<table border="1"> <[1]>User Info</[1]> <tr> <[2]>Username</[2]> <[2]>Email</[2]> </tr> <tr> <[3]>john_doe</[3]> <[3]>john@example.com</[3]> </tr> </table>
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using
thead instead of caption for the title.Mixing up
th and td tags.✗ Incorrect
The <caption> tag adds a title to the table. Header cells use <th>, and data cells use <td>.