Coloring Rows in a Table
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <style type="text/css"> .odd { background-color: lightgrey; } .even { background-color: yellow; } table { border: 1px solid black; border-spacing: 0; } td { padding: 4px 6px; border: 1px solid black; } </style> </head> <body> <table> <tr class="odd"> <td> Row 1 Cell 1 </td> <td> Row 1 Cell 2 </td> <td> Row 1 Cell 3 </td> </tr> <tr class="even"> <td> Row 2 Cell 1 </td> <td> Row 2 Cell 2 </td> <td> Row 2 Cell 3 </td> </tr> <tr class="odd"> <td> Row 3 Cell 1 </td> <td> Row 3 Cell 2 </td> <td> Row 3 Cell 3 </td> </tr> <tr class="even"> <td> Row 4 Cell 1 </td> <td> Row 4 Cell 2 </td> <td> Row 4 Cell 3 </td> </tr> <tr class="odd"> <td> Row 5 Cell 1 </td> <td> Row 5 Cell 2 </td> <td> Row 5 Cell 3 </td> </tr> <tr class="even"> <td> Row 6 Cell 1 </td> <td> Row 6 Cell 2 </td> <td> Row 6 Cell 3 </td> </tr> <tr class="odd"> <td> Row 7 Cell 1 </td> <td> Row 7 Cell 2 </td> <td> Row 7 Cell 3 </td> </tr> </table> </body> </html>
|
|
|
|
|
HTML code for linking to this page:
Related in same category :
-
-
-
-
-
-
-
-
-
-
-
|