HTML and CSS Reference
In-Depth Information
The valign attribute may have a value of top (default), bottom, center,
middle , or baseline , telling the browser to align the cell's contents to the
top or bottom edge, in the center or middle of the cell, or (Internet Ex-
plorer only) to the baseline of the first line of text in other cells in the
row.
10.2.4.2. The width attribute
Like its twin in the <table> tag that lets you widen a table, the width
attribute for table cell tags lets you widen an individual cell and hence
the entire column it occupies. You set the width to an integer number
of pixels or a percentage indicating the cell's width as a fraction of the
table as a whole.
For example:
<th width=400>
sets the current header cell's width, and hence the entire column of
cells, to 400 pixels wide. Alternatively:
<td width="40%">
creates a data cell with a column occupying 40 percent of the entire
table's width.
Because the popular browsers make all cells in a column the same
width, you should place a width attribute in only one cell within a
column, preferably the first instance of the cell in the first row, for
source readability. If two or more cells in the same column happen
to have width attributes, the widest one is honored. You can't make a
column thinner than the minimum needed to display all of the cells in
the column. Accordingly, if the browser determines that the column of
cells needs to be at least 150 pixels wide to accommodate all the cells'
 
Search WWH ::




Custom Search