table background-color css

 table background-color css


<html>
<head>
<style>
#customers 
{
  font-family: Arial,
 
Helvetica, sans-serif;

  border-collapse: collapse;

  width: 100%;
}

#customers td, 

#customers th 
{
  border: 1px solid 

#ddd;
  
padding: 8px;

}

#customers tr:nth-child(even)

{

background-color: #f2f2f2;

}

#customers tr:hover

 {

background-color: #ddd;

}

#customers th
 {
  padding-top: 12px;

  padding-bottom: 12px;

  text-align: left;

  background-color: #04AA6D;

  color: white;
}

</style>

</head>

<body>

<table id="customers">
  <tr>
    <th>Company</th>
    <th>Contact</th>
    <th>Country</th>
  </tr>
  <tr>
    <td>Alfreds Futterkiste</td>
    <td>Maria Anders</td>
    <td>Germany</td>
  </tr>
  <tr>
    <td>Berglunds snabbköp</td>
    <td>Christina Berglund</td>
    <td>Sweden</td>
  </tr>
  <tr>
    <td>Centro comercial Moctezuma</td>
    <td>Francisco Chang</td>
    <td>Mexico</td>
  </tr>
  <tr>
    <td>Ernst Handel</td>
    <td>Roland Mendel</td>
    <td>Austria</td>
  </tr>
  <tr>
    <td>Island Trading</td>
    <td>Helen Bennett</td>
    <td>UK</td>
  </tr>
  <tr>
    <td>Königlich Essen</td>
    <td>Philip Cramer</td>
    <td>Germany</td>
  </tr>
  <tr>
    <td>Laughing Bacchus Winecellars</td>
    <td>Yoshi Tannamuri</td>
    <td>Canada</td>
  </tr>
  <tr>
    <td>Magazzini Alimentari Riuniti</td>
    <td>Giovanni Rovelli</td>
    <td>Italy</td>
  </tr>
  <tr>
    <td>North/South</td>
    <td>Simon Crowther</td>
    <td>UK</td>
  </tr>
  <tr>
    <td>Paris spécialités</td>
    <td>Marie Bertrand</td>
    <td>France</td>
  </tr>
</table>

</body>
</html>

Comments

Last 7 Days

How to use sandbox attribute value ( allow-popups ) with < iframe > tag in HTML ? with example

How do you add color to a < table > in HTML?

what is solidity programming language ?

How to add Amazon website inside iframe?

How to Create a table in html with 2 rows and 3 columns (Source code )

How to use referrerpolicy Attribute value ( no-referrer-when-downgrade ) with < iframe > tag in HTML ? with example

How to use loop attribute with < video > tag in HTML for YouTube ? with example

All 35 reserved keywords in Solidity programming language