Locked lesson.
About this lesson
Tables are an important and sometimes confusing element of HTML. We'll look at table tags, th, tr, td tags, and more.
Exercise files
Download this lesson’s related exercise files.
Creating HTML Tables.docx59.2 KB Creating HTML Tables - Solution.docx
59.5 KB
Quick reference
Creating HTML Tables
In this video we'll learn how to create an HTML table.
When to use
Use tables whenever you have rows and columns of data that you would like to respresent in table form.
Instructions
To create a table tag, use the following general code:
<table>
<tr>
<th>Header 1</th>
<th>Header 2</th>
<th>Header n</th>
</tr>
<tr>
<td>Column of Data 1</td>
<td>Column of Data 2</td>
<td>Column of Data n</td>
</tr>
</table>
Hints & tips
- Create tables with the <table> and </table> tags
- Table headers use the <th> and </th> tags.
- Table rows use the <tr> and </tr> tags.
- Table data use the <td> and </td> tags.
Lesson notes are only available for subscribers.