Sample Video Frame
07: Tables
Tables are used in HTML to display tabular data, which can be almost anything. If you write a web application eventually you'll have to show someone a table of data. Tables might be used in an admin screen to view a list of users, or in the main UI to show people their most recent logins. If you've ever use Microsoft Excel then you've used a table.
Warm-up
Here is a table of fruits:
Name | Color |
---|---|
Apple | Red |
Mango | Orange |
Strawberry | Red |
Pitaya | Magenta |
Enter this HTML into a file (like ex07.html
) and then complete the three missing rows of the table. If you can't figure it out, read the exercise, the come back and attempt it:
<table>
<thead>
<tr>
<th>Name</th>
<th>Color</th>
<tr>
</thead>
<tbody>
<tr><td>Apple</td><td>Red</td></tr>
</tbody>
</table>
Register for Learn JavaScript the Hard Way
Register today for the course and get the all currently available videos and lessons, plus all future modules for no extra charge.