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

HTML Referenzhandbuch

HTML-Tag大全

HTML td valign-Eigenschaft

Die valign-Eigenschaft legt die vertikale Ausrichtung des Inhalts in Zellen fest, Online-Beispiel, um die Verwendung der HTML td valign-Eigenschaft, die Kompatibilität der Browser, die Syntaxdefinition und die detaillierten Informationen zu ihren Attributwerten zu demonstrieren.

 HTML <td> Tag

Online-Beispiel

In<td>Elemente den Inhalt vertikal ausrichten:

<table style="width:100%" border="1" height="400">
  <tr>
    <th>Nr.</th>
    <th>Monat</th>
    <th>Ersparnis</th>
  </tr>
  <tr>
    <td valign="top">1</td>
    <td valign="top">Januar</td>
    <td valign="top">3100</td>
  </tr>
  <tr>
    <td valign="bottom">2</td>
    <td valign="bottom">Februar</td>
    <td valign="bottom">2180</td>
  </tr>
</table>
Testen Sie, ob ‹/›

Browser-Kompatibilität

IEFirefoxOperChromeSafari

All major browsers support the valign attribute.

Definition and Usage

HTML5 The <td> valign attribute is not supported. Please use CSS instead.

The valign attribute specifies the vertical alignment of the content within the cell.

Syntax

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

Attribute Value

ValueDescription
topAlign content to the top.
middleAlign content to the center (default value).
bottomAlign content to the bottom.
baselineAlign content to 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, the bottom vs. baseline illustration:

valign="bottom"

valign="baseline"

 HTML <td> Tag