This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

The HTMLStyleElement.scoped property is a Boolean value indicating if the element applies to the whole document (false) or only to the parent's sub-tree (true).

By default it contains the value of the scoped.


value = style.scoped;
style.scoped = true;


Specification Status Comment
HTML Living Standard
The definition of 'scoped' in that specification.
Living Standard No change from HTML5.
HTML 5.1
The definition of 'scoped' in that specification.
Recommendation Initial definition.

Browser compatibility

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support No support[1] No support[2] No support No support No support
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic suppport ? No support[2] No support No support No support

[1] Chrome 19 up to 34 supports it after activating the ‘Enable <style scoped>’ entry in chrome://flags. Removed in Chrome 35 and later.

[2] Firefox 21 implemented the scoped property, but it was hidden behind a pref (layout.css.scoped-style.enabled) in content documents in Firefox 55+, as no other browsers support it.

See also

Document Tags and Contributors

Contributors to this page: chrisdavidmills, Sheppy, teoli, Nexii, kscarfone
Last updated by: chrisdavidmills,