0
0
HTMLmarkup~10 mins

Table structure in HTML - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete 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'
A border="1"
Bstyle="border: 1px solid black;"
Cclass="my-table"
Dlang="en"
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.
2fill in blank
medium

Complete 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'
A<head
B<th
C<header
D<td
Attempts:
3 left
💡 Hint
Common Mistakes
Using <td> instead of <th> for header cells.
Using tags like <header> or <head> inside the table.
3fill in blank
hard

Fix 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'
A</table>
B</tr>
C</td>
D</th>
Attempts:
3 left
💡 Hint
Common Mistakes
Closing the row instead of the cell.
Closing the table instead of the cell.
4fill in blank
hard

Fill 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'
Ath
Btr
Ctd
Dtable
Attempts:
3 left
💡 Hint
Common Mistakes
Using td for headers.
Using th for data cells.
5fill in blank
hard

Fill 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'
Acaption
Bth
Ctd
Dthead
Attempts:
3 left
💡 Hint
Common Mistakes
Using thead instead of caption for the title.
Mixing up th and td tags.