HTML and style and scoped properties
Using the scoped property in a label restricts the style to affecting only the parent element of the label and all of its descendant elements.
Use the scope property to describe the style of the element:
<style type="text/css" scoped>
h1 {color:red;}
p {color:blue;}
</style>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</div>
Try it out . . .
Browser support
Only Firefox properties support scoped properties.
Definitions and usages
The scoped property is a Boolean property.
If you use this property, the style applies only to the parent element of the style element and its children.
The difference between HTML 4.01 and HTML5
The scoped property is a new property in HTML5.
The difference between HTML and XHTML
In XHTML, the property is not allowed to be short-written, and the scoped property must be defined as: .
Grammar
HTML .lt;style> tags