-
Notifications
You must be signed in to change notification settings - Fork 0
/
tutorial-17.html
67 lines (64 loc) · 2.06 KB
/
tutorial-17.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Attribute and nth child pseudo selector</title>
<style>
.container{
display: block;
width: 500px;
}
input{
display: block;
}
input[type='text']{
font-size: 18px;
padding: 15px;
border: 2px solid saddlebrown;
}
a[target]{
font-size: 16px;
color: chocolate;
}
a[target='_self']{
font-size: 24px;
color: brown;
padding: 15px;
}
li:nth-child(1){
background-color: black;
color: cornsilk;
}
li:nth-child(2n+2){
background-color: gainsboro;
color: antiquewhite;
}
li:nth-child(odd){
color: darkslategray;
background-color: cornflowerblue;
}
</style>
</head>
<body>
<div class="container">
<h1><a href="https://www.Google.com" target="_blank">Go to Google</a></h1>
<h1><a href="https://www.SoloLearn.com" target="_self">Go to SoloLearn</a></h1>
<form action="" class="form-control">
<input type="text" placeholder="Enter Your Name">
<input type="password" placeholder="Enter Password">
<input type="submit" value="Submit">
</form>
<li class="item" id="1">item-1</li>
<li class="item" id="2">item-2</li>
<li class="item" id="3">item-3</li>
<li class="item" id="4">item-4</li>
<li class="item" id="5">item-5</li>
<li class="item" id="6">item-6</li>
<li class="item" id="7">item-7</li>
<li class="item" id="8">item-8</li>
<li class="item" id="9">item-9</li>
</div>
</body>
</html>