Skip to content

Commit

Permalink
Video 17 Completed
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeWithHarry committed Oct 12, 2023
1 parent a74ecb2 commit f299bf5
Showing 1 changed file with 84 additions and 0 deletions.
84 changes: 84 additions & 0 deletions Video 17/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS Selectors</title>
<style>
/* Element Selector */
div{
/* background-color: red; */
}

/* Class Selector */
.red{
background-color: red;
}

/* Id Selector */
#green{
background-color: green;
}

/* Child Selectors */
div > p {
color: blue;
background-color: brown;
}

/* Descendant Selector */
div p {
color: blue;
background-color: brown;
}

/* Universal Selector */
* {
margin:0;
padding: 0;
}

/* Pseudo Selector */
a:visited{
color: yellow
}

a:link {
color: green;
}

a:active{
background-color: red;
}

a:hover{
background-color: yellow;
}


p:first-child{
background-color: aqua;
}

</style>
</head>
<body>
<main class="one">
<p>I am first</p>
<p>I am second</p>
</main>
<div class="red">
I am a div
<article>

<p>I am a para inside div</p>
</article>
</div>

<div id="green">
I am another div
</div>
<a href="https://www.google.com">Go to Google</a>
<a href="https://www.facebook2.com">Go to Facebook</a>
</body>
</html>

0 comments on commit f299bf5

Please sign in to comment.