<!DOCTYPE html>
<body>
  <p>First</p>
  <div>
    <style scoped>
      p { color: red }
    </style>
    <p style="color: green">Second</p>
  </div>
  <p>Third</p>
</body>