<html>
<head>
<style>
h1 {color:green;}
p {color:black;}
</style>
</head>
<body>
<div>
<style scoped>
h1 {color:red;}
p {color:blue;}
</style>
<h1>This heading should be red</h1>
<p>This paragraph should be blue.</p>
</div>
<h1>This heading should be green</h1>
<p>This paragraph should be black.</p>
<p><b>Note:</b> The scoped attribute is deprecated. Do not use it.</p>
</body>
<!-- Mirrored from www.w3schools.com/tags/tryit.asp?filename=tryhtml5_style_scoped by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 03:17:53 GMT -->
</html>