Simple Specificity Demo

In this example below you will see how to do a Simple Specificity Demo with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by jgclifton, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright jgclifton ©
  • HTML
  • CSS
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>Simple Specificity Demo</title>
  
  
  
      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>

  <p class="blue-text" id="green-text">this is a paragraph of text</p>
  
  

</body>

</html>

/*Downloaded from https://www.codeseek.co/jgclifton/simple-specificity-demo-aBmfg */
p {
  color: red;
}

.blue-text {
  color: blue;
}

#green-text {
  color: green;
}

Comments