Skip to content
Related Articles

Related Articles

Improve Article
HTML | scoped Attribute
  • Last Updated : 30 Sep, 2019

The HTML scoped attribute is a boolean attribute which is used to specify that the styles only apply to this element’s parent element and that element’s child elements (not the entire document).

Supported tag:

  • style


<!DOCTYPE html>
            <style scoped>
                h1 {
                    color: green;
                h2 {
                    color: black;
            <h1 style="red">GeeksforGeeks</h1>
            <h2>HTML scoped attribute</h2>


Supported Browsers: The browsers supported by HTML scoped Attribute are listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Apple Safari
  • Opera
My Personal Notes arrow_drop_up
Recommended Articles
Page :