English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Manual de referência HTML

大全 de etiquetas HTML

HTML: <tr> atributo valign

<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.

 HTML <tr> tag

Exemplo online

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 ‹/›

Navegador compatível

IEFirefoxOperaChromeSafari

All mainstream browsers support the valign attribute.

Definition and usage

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.

Syntax

<tr valign="top|middle|bottom|baseline">

Attribute value

ValueDescription
topAlign the content upward.
middleAlign the content in the center (default value).
bottomAlign the content downward.
baselineAlign 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