What if we want to set a background for every second element? With IDs, we'd need a new rule for each.

Instead, we can set a class attribute for the elements we want to change. Here, we set the grey-element class.

<html>
<head>
  <style>
.grey-element{
background-color: lightgrey;}
  </style>
</head>
  <body>
   <ol>
    TO DO:
    <li class="grey-element">Floss</li>
    <li>Feed Cat</li>
    <li class="grey-element">Nap</li>
    <li>Plan holiday</li>
    <li class="grey-element">Order tea</li>
   </ol>
</body>
</html>]]>