-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathselectors in css
More file actions
61 lines (55 loc) · 1.36 KB
/
selectors in css
File metadata and controls
61 lines (55 loc) · 1.36 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Selectors oin CSS</title>
<style>
div{
background-color: red;
}
/*This is the class selecctors in css*/
.red{
background-color: blue;
}
/*This is the ID selecctors in css*/
#green{
background-color: rgb(35, 189, 181);
}
/*This is the use case of the universal selector */
*{
margin: 0;
padding:0;
}
/* use of the pseudo selectors in css */
a:active{
background-color: blueviolet;
}
a:hover{
background-color: yellow;
}
/* use of the descendent selectors in css */
div p{
background-color: green;
}
</style>
</head>
<body>
<div>
This is the div;
</div>
<!--This is the class selecctors in css-->
<div class="red">
This is the another div;
</div>
<div id="green">
This is the one another div;
</div>
<a href="https://www.google.com/">open Google</a>
<div>
<article>
<p>This is the last div used for the descendent selectorsin css</p>
</article>
</div>
</body>
</html>