-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex17.html
More file actions
70 lines (70 loc) · 1.62 KB
/
Copy pathindex17.html
File metadata and controls
70 lines (70 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<!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>
div{
background-color:red;
color: white;
}
/* Class Selector */
.blue{
background-color: blue;
color: yellow;
}
/* Id Selector */
#Green{
background-color: green;
}
/* Child Selector */
div > p {
background-color: violet;
color: white;
}
/* Descendant Selector */
div p{
background-color: aqua;
}
/* Universal Selector */
*{
margin: 0;
padding: 0;
}
/* Pseudo Selector */
a:visited{
color: green;
}
a:link{
color: red;
}
a:active{
color: orangered;
background-color: violet;
}
a:hover{
background-color: brown;
}
p:first-child{
background-color: red;
}
</style>
</head>
<body>
<div class="one">
<p>I am First</p>
<p>I am Second</p>
</div>
<div>
I am a Div
</div>
<div class = "blue">
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem repudiandae fugit explicabo voluptatem.</p>
I am another Div
</div>
<div id="Green">Green Karne ka</div>
<a href="https://www.google.com">Go to google</a>
<a href="https://www.Bing.com">Go to Bing</a>
</body>
</html>