TABLES
Here's an example
What the HTML Means Width -- Based on the above HTML code, the table is to be 50% of the width of the page when viewed in your browser. Resize the browser, you will see that the table resizes as well. TR -- The TR represents the table row -- the horizontal rows that construct the table. In this table, there are two rows. There must be a TR, table row, in order to display what goes into the table. TD -- Within that TR, there must also be a TD, which technically holds the table data. The table data in the example above has the width=50%. This means that the table data is 50% of the width of the table. TD Width May Vary
TD Alignment In this example all the sizes are the same, but the data within the table has been aligned differently.
Cellpadding Here's that same table with a cellpadding that is 5. This means that each cell will have a padding of 5 around the top, bottom, left and right of the data in the cell.
Rowspan and Colspan What can make tables more complicated is that you can determine the rowspan and the colspan. This, once again, is best explained through demonstration. Here's a slightly different table. This table has three rows and three columns.
Here is the same table with a colspan = 3, which means that the row is to span all three columns.
The rowspan command works the same way and is great if you want the text in one particular row to take up the entire row.
Or using colspan, the columns can span all three columns.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||