Jump to: navigation, search

HTML Table Text Vertical Align

From w3cyberlearnings

Contents

HTML Table Vertical Align

Set vertical align for text or content by using CSS.

Example 1 TRY-IT

To set vertical align to top.

<style>
	table {
		padding:8px;
		border-spacing: 3px;

	}
	th,td {
		height:50px;
		border:1px solid black;
		width:50px;
		vertical-align: text-top;
	}
</style>

Example 2 TRY-IT

To set the vertical align to bottom.

<style>
	table {
		padding:8px;
		border-spacing: 3px;

	}
	th,td {
		height:50px;
		border:1px solid black;
		width:50px;
		vertical-align: bottom;
	}
</style>

Related Link


Table
  1. HTML - Table
  2. HTML - Table Border
  3. HTML - Table Column
  4. HTML - Table Row
  5. HTML - Table Color
  6. HTML - Table Cell Spacing and Padding
  7. HTML - Text Align
  8. HTML - Text Vertical Align
  9. HTML - Table Caption and Summary
  10. HTML - Table thead, tbody, tfoot
  11. HTML - Inner Table
  12. HTML - Table Vertical Line
  13. HTML - Table Horizontal Line
Navigation
Web
SQL
MISC
References