Created
August 20, 2020 19:23
-
-
Save kushalseth/b0ba8d6aa21b28def616d393af41e9ad to your computer and use it in GitHub Desktop.
cssinheritence
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
div { | |
background-color: #ffff00; // yellow | |
} | |
p { | |
background-color: #ff0000; // red | |
} | |
</style> | |
</head> | |
<body> | |
<div> | |
<h2>I am h2 directly under div</h2> | |
<p data-test="001">This is para inside div, but not directly inside div</p> | |
</div> | |
<p class="myclass" data-test="001">I am paragraph directly inside the body and below a div</p> | |
</body> | |
</html> |
Author
kushalseth
commented
Aug 20, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment