Sunday, November 4, 2018

Overlapping elements in CSS

<html>
  <head>
    <style>
      .one { color: green }
      .two { color: orange }
    </style>
  </head>

  <body>

  <div class="one two">
    hello world
  </div>
</body>
</html>

 The class".one" is applied because it comes first in <style> tag.