English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
<tr> Uso do atributo valign, o atributo valign especifica o alinhamento vertical do conteúdo das linhas da tabela, exemplo online demonstrando como usar o atributo valign do <tr>, compatibilidade do navegador, definição da sintaxe e detalhes dos valores dos atributos, etc.
Uma tabela HTML com diferentes alinhamentos verticais de linhas:
<table style="width:100%" border="1"> <tr valign="middle"> <td>2018</td> <td>$15320.00</td> </tr> <tr valign="top"> <td>2019</td> <td>$18320.00</td> </tr> </table>Teste e veja ‹/›
IEFirefoxOperaChromeSafari
All mainstream browsers support the valign attribute.
HTML5 The <tr> valign attribute is not supported. Please use CSS instead.
The valign attribute specifies the vertical alignment of the content in the table row.
<tr valign="top|middle|bottom|baseline">
Value | Description |
---|---|
top | Align the content upward. |
middle | Align the content in the center (default value). |
bottom | Align the content downward. |
baseline | Align with the baseline. The baseline is a fictional line. In a line of text, most letters are based on the baseline. The baseline value sets all table data in the line to share the same baseline. The effect of this value is often the same as the bottom value. However, if the text sizes are different, the baseline effect is better. Please see the illustration below. |
When the text size is different, bottom vs. baseline illustration:
valign="bottom"
valign="baseline"
HTML <tr> tag