Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
CSS Cascading example
<!DOCTYPE html>
div p {
background-color: #ffff00; // yellow
p {
background-color: #ff0000; // red
} {
background-color: #ffa500; // orange
<h1>This is h1 directly under body</h1>
<p class="abc-myclass"> Test class attribute para </p>
<h2>I am h2 directly under div</h2>
<p data-test="001">This is para inside div, but not directly inside div</p>
<p class="abc-myclass">This is para directly inside div</p>
<span><p>This is para inside span</p></span>
<p class="myclass" data-test="001">I am paragraph directly inside the body and below a div</p>
<a href="" target="_blank">GIT rofile</p>

This comment has been minimized.

Copy link
Owner Author

@kushalseth kushalseth commented Aug 12, 2020


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment