Adding a Table Row
Another critical building block of an HTML table is the table row, represented by the tr element (see Example 4-3).
Example 4-3. A table with a table row
<table width="90%" border="1" cellspacing="5" cellpadding="5"><tr></tr></table>
Every table requires at least one row. Rows are the horizontal aspects of the table. Although this markup alone will not display in and of itself, I've added the necessary components so you can visualize the row clearly (see Figure 4-3).
Figure 4-3. A table with one row—the spacing between the row's outline and the table's outline is created by the cellspacing and cellpadding attributes.
You can add as many rows as your table requires.
For the next example, I've added two rows to provide ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access