<New code>
block HTML
<table>
- contains table data
block HTML
<caption>
- contains the caption for table
block HTML
<thead>
- contains the headings for the table
block HTML
<tbody>
- contains the body of the table data
block HTML
<tr>
- begin a table row
block HTML
<th>
- contains a table heading cell
block HTML
<td>
- contains a cell of table data
inline HTML
<br>
- creates a new line
Creating tables of information
You are also going to learn how to create tables in HTML. Tables are constructed as a series of nested containers. Think of tables like this:
-
A table
<table>
contains a caption<caption>
and several rows<tr>
-
Each row
<tr>
contains several cells -
Each cell can be either a table heading cell
<th>
, or it can be a table data cell<td>
<table>
<caption>All I know about pickles</caption>
<thead>
<tr>
<th>Pickle names</th>
<th>Average pickle rating</th>
</tr>
</thead>
<tbody>
<tr>
<td>Polski ogorki</td>
<td>9/10</td>
</tr>
<tr>
<td>Bread and butter</td>
<td>6/10</td>
</tr>
<tr>
<td>Banana peppers</td>
<td>3/10</td>
</tr>
</tbody>
</table>
Makes this...