<!DOCTYPE html>
<body>
  <p>First</p>
  <p>
    <style scoped>
      p { color: red }
    </style>
    <style scoped>
      p { text-decoration: underline }
    </style>
    Second
    <style scoped>
      p { color: green }
    </style>
  </p>
  <p>Third</p>
</body>