Edit in JSFiddle

<!doctype html>
<html>

  <head>
    <title>Basic Selector Combination</title>
    <style>
      .header {
        color: red;
      }

      div.header {
        color: blue;
      }

      h1,
      h2 {
        color: green
      }

    </style>
  </head>

  <body>
    <p class="header">text-1</p>
    <div>text-2</div>
    <div class="header">text-3</div>
    <div>
      <h1>text-4</h1>
    </div>
    <div class="header">
      <h1>text-5</h1>
    </div>
    <h2>text-6</h2>
  </body>

</html>