-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtut11.htm
More file actions
56 lines (53 loc) · 1.42 KB
/
tut11.htm
File metadata and controls
56 lines (53 loc) · 1.42 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>More selectors</title>
<style>
*{
font-size: 25px;
}
h1{
background-color: darkred;
color: darkturquoise;
font-weight: bold;
text-align: center;
}
/* only affect the p which is only under div not ul */
/* If p is contained by any li which is contained by div */
/* div li p{
color: yellow;
background-color: green;
} */
/* If p is right inside div then this css will apply */
/* div > p{
color: yellow;
background-color: green;
}
/* if p is right after div i.e. p is the next sibling of div */
/* div + p{
color: white;
background-color: rgb(231, 161, 161);
}
ul + p{
background-color: rgb(235, 18, 180);
} */
</style>
</head>
<body>
<h1>This is more on selectors</h1>
<div class="container">
<div class="row">
<ul>
<li class="item"><p> This is another paragraoh inside li</p></li>
<!-- <li>This will not get affetced</li> -->
<p>This will not get affected.</p>
</ul>
<p>This is a paragraph</p>
</div>
<p>This is another paragraph</p>
</div>
<p>This is outer most paragraph</p>
</body>
</html>