HTML col valign attribute
Examples
Column table with different vertical alignment:
<table border="1"
style="height:200px">
<col valign="top">
<col valign="bottom">
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
</table>
<col valign="top">
<col valign="bottom">
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
</table>
try it"
Browser Support
Only Internet Explorer and Opera support valign attributes. However, IE and Opera do not support the value "baseline".
Definition and Usage
HTML5 is no longer supported <col> valign attributes.
align attribute specifies the relevant <col> element contents of the vertical alignment.
grammar
<col valign="top|middle|bottom|baseline">
Property Value
值 | 描述 |
---|---|
top | 对内容进行上对齐。 |
middle | 对内容进行居中对齐(默认值)。 |
bottom | 对内容进行下对齐。 |
baseline | 与基线对齐。 |
The baseline is an imaginary line. In a line of text, most of the letters to the baseline as a reference. baseline value row all data tables share the same baseline. The effect of the value and bottom value are often the same. However, if the font size of the text are different, then the baseline effect will be better. Consider the following illustration:
valign = "bottom"
valign = "baseline"
HTML <col> tag