This was done using pre.
<pre> This was done <font color=green>using pre</font>. </pre> |
(.resize win 200 300)
<table bgcolor=yellow border=10 cellpadding=20 cellspacing=5> <tr> <th>heading 1</th> <th>heading 2</th> <th> etc.,</th> <th> etc.,</th> </tr> <tr> <td bgcolor= green> 1 data in 1st row</td> <td bgcolor=red>2nd data in 1st row</td> <td bgcolor=white>...</td> <td bgcolor=yellow>...</td> </tr> <tr> <td>1st data in 2nd row</td> <td>2nd data in 2nd row</td> <td>...</td> <td>...</td> </tr> </table>where each row is defined by a
tr
element and each
item in that row is defined by a td
or a th
element. The latter is used for the headers which may appear in the
first row. Note that the rowspan and colspan attributes of td elements
allow one to define data elements that span several columns or rows.
heading 1 | heading 2 | etc., | etc., |
---|---|---|---|
green | red | white | yellow |
green? | red? | white? | yellow? |
green? | lightgreen | lightblue | |
green? | red? | white? | |
green font | red font | white? | yellow? |
<table bgcolor=yellow border=10 cellpadding=20 cellspacing=5> <tr> <th>heading 1</th> <th>heading 2</th> <th> etc.,</th> <th> etc.,</th> </tr> <tr> <td bgcolor= green> green</td> <td bgcolor=red>red</td> <td bgcolor=white>white</td> <td bgcolor=yellow>yellow</td> </tr> <tr> <td>green?</td> <td>red?</td> <td>white?</td> <td>yellow?</td> </tr> <tr> <td>green?</td> <td rowspan=2 bgcolor=lightgreen>lightgreen</td> <td colspan=2 bgcolor=lightblue>lightblue</td> </tr> <tr> <td>green?</td> <td>red?</td> <td>white?</td> </tr> <tr> <td><font color=green>green font</td> <td><font color=red >red font</td> <td>white?</td> <td>yellow?</td> </tr> </table>
Try cutting and pasting sample tables into the HTML demo page to see how they come out.