<div id="demo-02">
  <p>Hover over me</p>

  <input type="text" placeholder="focus on me" />
  <br />
  <button>Click me</button>
</div>
#demo-02 p:hover {
    background-color: #f0a;
}

#demo-02 input:focus {
    background-color: #bada55
}

#demo-02 button:active {
    color: #ff0000;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.