HTML and CSS Reference
In-Depth Information
<tr>
<th> Red </th>
<th> Yellow </th>
<th> Blue </th>
</tr>
NOTE
You can format the HTML code any way you want. As with all
HTML, the browser ignores most extra spaces and returns. I like
to format it like this, with the contents of the individual rows
indented and the cell elements on separate lines so that I can
pick out the rows and columns more easily.
Now add the second row. The first cell in the second row is the Red heading on the left
side of the table, so it will be the first cell in this row, followed by the cells for the table
data:
10
<tr>
<th> Red </th>
<td> Red </td>
<td> Orange </td>
<td> Purple </td>
</tr>
Continue by adding the remaining two rows in the table, with the Yellow and Blue head-
ings. Here's what you have so far for the entire table:
Input
<table border=“1” summary=“color combinations”>
<tr>
<th> Red </th>
<th> Yellow </th>
<th> Blue </th>
</tr>
<tr>
<th> Red </th>
<td> Red </td>
<td> Orange </td>
<td> Purple </td>
</tr>
<tr>
<th> Yellow </th>
<td> Orange </td>
<td> Yellow </td>
<td> Green </td>
 
 
Search WWH ::




Custom Search