HTML Valign Attribute - HTML Tutorials - W3resource
Có thể bạn quan tâm
HTML valign attribute Last update on August 19 2022 21:50:39 (UTC/GMT +8 hours)
valign
The purpose of the HTML valign attribute is to define the vertical alignment of the content of a table cell.
Supported elements
HTML valign attribute supports col, colgroup, tbody, td, tfoot, th, thead, tr elements.
Syntax
<ElementName valign="value" >.....</ElementName>Where ElementName is any supported element.
Type of value
Predefined.
Default value
| Value | Description |
|---|---|
| top | Sets the vertical alignment of cell content top. |
| middle | Sets the vertical alignment of cell content center. |
| bottom | Sets the vertical alignment of cell content bottom. |
| baseline | If set, the first text line occurs on a baseline common to all cells in the row. |
Supported doctypes
HTML 4.01 strict, HTML 4.01 transitional, HTML 4.01 frameset.
Example of HTML valign attribute
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Example of HTML valign attribute with td element </title> </head> <body> <table width="200" border="1" cellpadding="2"> <tr> <th valign="middle" >Student Code </th> <th valign="middle">Percentage of marks</th> <th valign="middle">Grade</th> <th valign="middle">Remarks</th> </tr> <tr> <td valign="baseline">S001</td> <td valign="baseline">92</td> <td valign="baseline">A+</td> <td valign="baseline">Excellent</td> </tr> <tr> <td valign="baseline">S002</td> <td valign="baseline">76</td> <td valign="baseline">B+</td> <td valign="baseline">Good</td> </tr> </table> </body> </html>Result
View this example in a separate browser window
Example of HTML valign attribute
Previous: HTML usemap attribute Next: HTML value attribute
Từ khóa » Html Column Vertical Alignment
-
HTML |
Valign Attribute - GeeksforGeeks Vertical-align - CSS: Cascading Style Sheets - MDN Web Docs
Vertical Align Middle Inside Div Columns - Stack Overflow
CSS Vertical-align Property - W3Schools
CSS Table Alignment - W3Schools
Vertical Alignment - Bootstrap
Vertical Alignment · Bootstrap V5.0
Vertical Alignment - Tailwind CSS
How To Vertical Align A DIV In Bootstrap - Tutorial Republic
CSS Vertical Align For Everyone (Dummies Included) - OutSystems
Vertical-align - CSS-Tricks
Vertical Alignment - HTML Help
Bootstrap 4 Vertical Center. How To Vertically Align Anything - Medium
(Archives) HTML: Tables: Alignment Within A Table | UW-Eau Claire
Copyright © 2022 | Thiết Kế Truyền Hình Cáp Sông Thu