table {
  width: 50%;
  border-collapse: collapse;
  margin: 20px 0;
}

th,
td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}

tr:nth-child(even) {

  background-color: #f2f2f2;
}

tr:hover {
  background-color: #ddd;
}

th {
  background-color: #f2f2f2;
}