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