Vertical Alignment of Cell Contents

 

5. Vertical Alignment of Cell Contents

You can control the vertical alignment of table cell contents using the valign attribute or CSS.

Using HTML valign:

<table border="1"> <tr> <td valign="top">Top</td> <td valign="middle">Middle</td> <td valign="bottom">Bottom</td> </tr> </table>

Using CSS:

<table border="1"> <tr> <td style="vertical-align: top;">Top</td> <td style="vertical-align: middle;">Middle</td> <td style="vertical-align: bottom;">Bottom</td> </tr> </table>

Comments

Popular posts from this blog

Introduction to Computer

History of Computer

Computer Generation