English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
In HTML5 Nicht unterstützt <colgroup> valign Attribut. Das valign-Attribut legt die vertikale Ausrichtung des Inhalts in der Spaltengruppe fest.
Eine HTML-Tabelle mit Spalten mit verschiedenen vertikalen Ausrichtungsarten:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>HTML <colgroup> span Attribut verwenden-Grundlagen教程(oldtoolbag.com)</title> <style>table, th, td { border: 1px solid black;}</style> </head> <body> <table style="height:200px"> <colgroup valign="top"> <colgroup valign="bottom"> <tr> <th>Monat</th> <th>Ersparnisse</th> </tr> <tr> <td>January</td> <td>$100</td> </tr> </table> </body> </html>Testen Sie es heraus ‹/›
IEFirefoxOperaChromeSafari
Nur Internet Explorer und Opera unterstützen das valign-Attribut. Allerdings unterstützen IE und Opera den Attributwert "baseline" nicht.
In HTML5 In HTML, the valign attribute of <colgroup> is not supported.
The valign attribute specifies the vertical alignment of the content within the column group.
<colgroup valign="top|middle|bottom|baseline">
Value | Description |
---|---|
top | Aligns content upward. |
middle | Aligns content to the center (default value). |
bottom | Aligns content downward. |
baseline | Aligns content to the baseline. The baseline is an imaginary 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 size is 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 <colgroup> Tag