HTML and CSS Reference
In-Depth Information
The contents of the <th> and <td> tags can be anything you might put in
the body of a document, including text, images, forms, and so oneven
another table. And, as described earlier, the browser automatically cre-
ates a table large enough, both vertically and horizontally, to display all
the contents of any and all the cells.
If a particular row has fewer header or data items than other rows, the
browser adds empty cells at the end to fill the row. If you need to make
an empty cell before the end of a rowfor instance, to indicate a missing
data pointcreate a header or data cell with no content.
Empty cells look different from those containing data or headers if the
table has borders: the empty cell does not appear embossed onto the
window but instead is simply left blank. If you want to create an empty
cell that has incised borders like all the other cells in your table, be sure
to place a minimal amount of content in the cell: a single <br> tag, for
instance.
10.2.4.1. The align and valign attributes
The align and valign attributes are identical to those of the same name
for the table row tag ( <tr> ; see 10.2.3 , earlier in this chapter), except
that when used with a <th> or <td> tag, they control the horizontal or
vertical alignment of content in just the current cell. Their value over-
rides any alignment established by the respective align or valign attrib-
ute of the <tr> tag but does not affect the alignment of subsequent cells.
Refer to Table 10-1 for alignment details.
You may set the align attribute's value to left, right , or center , causing
the browsers to align the cell contents against the left or right edge or
in the center of the cell, respectively.
In earlier versions, Internet Explorer (version 5) also supported the align
value justify so that the words spread out to fill the cell, as in a news-
paper column. No longer.
 
Search WWH ::




Custom Search