|
<tr> This is the table row tag. The table row element groups all table data
cells of a row into one unit. It can be used to specify certain attributes that pertain the
all cell in that row such as align and valign (vertical align; values can be top, middle,
bottom and baseline). The table row element tells the browser when to create a new row as it
renders the table.
<td> This is the table data cell tag. This tag is used to specify the smallest
unit of the table (the actual data cell). The content of the cell is specified between the
correlating opening and closing table data cell tags. This tag has width and height
attributes, as well as a couple of new ones that we have not yet seen in any other elements
called colspan and rowspan. The colspan attribute allows a single cell to span across multiple
columns, the value of the colspan attribute should be set to a number equal to the desired
amount of columns to be stretched across. The rowspan attribute is the same as the colspan
attribute except that it specifies the number of columns for the cell to be stretched across
vertically.
<th> This is the table header tag. This tag can substitute any table data cell
tag. Individual browser may render this tag differently, but for the most part it will be
displayed as bold horizontally and vertically centered text. It shares all of the table data
cells attributes.
Example: Please look over the following example (source and formatted page). Feel free
to experiment with the source code. I attempted to address some of the problems beginners tend
to have when first learning how to use tables, particularly with gaps between pictures that they
wanted to appear to be a single picture.
View Source
View Formatted Page |