Jump to: navigation, search

HTML Table Color

From w3cyberlearnings

Contents

HTML Table color

Define Table background color and font color.

Example 1 TRY-IT

Define CSS for the table odd and even row.

<style>
		
	.odd {
		background-color:blue;
				
	}
	.even {
		background-color:red;
	}
</style>

Example 2 TRY-IT

This example is similar to the first example, but the table border color sets to white.

<style>
	table {
		border:1px solid white;
	}
	.odd {
		background-color:blue;
		color:white;
	}
	.even {
		background-color:red;
	}
</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