Snippets Collections
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>CSS Selector's</title>

  <style>
    /*Elements Selector's*/
    body{
      background-color: rgb(75, 56, 56);
    }

    /*# Sign is for ID's*/
    #welcome{
      background-color: rgb(31, 151, 57);
    }
    /* . sign is for class */
    .primary-heading{
      color: crimson;
    }
    .about{
      color:darkgoldenrod;
    }
    /*Multiple selectors 
    Multiple selectors is divided by "," coma*/
    #welcome,#about{
      border: 1px solid black;
      padding: 10px;
      margin-bottom: 10px;
    }

    /* Nasted selector's */
    #welcome p{
      background-color:oldlace;
      font-size: 20px;0
    }
    #about{
      background-color: blanchedalmond;
    }
    
  </style>

</head>
<body>
  
  <div id="welcome">
    <h2 class="primary-heading">Welcome to Our Course </h2>
    <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Non odit sed impedit rem tempore labore quasi veritatis laborum quae quo?</p>
  </div>

  <div id="about">
    <h2 class="about">About</h2>
    <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Doloremque debitis esse expedita quo sit. Praesentium ea ipsum numquam voluptas exercitationem?</p>
  </div>



</body>
</html>
star

Sun Mar 21 2021 17:00:32 GMT+0000 (UTC)

#css #cssselectors

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension