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