Sample Video Frame

Created by Zed A. Shaw Updated 2024-02-17 04:54:36
 

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:

NameColor
AppleRed
MangoOrange
StrawberryRed
PitayaMagenta

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>
Previous Lesson Next Lesson

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.