-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
123 lines (112 loc) · 3.74 KB
/
index.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<!doctype html>
<html>
<head>
<title>Red Hot Chili Peppers</title>
<style>
/* All styles go here. */
/* 1 */
tr:first-child {
font-weight: bold;
}
/* 2 */
tr td:first-child {
background-color: red;
}
/* 3 */
tr:nth-of-type(2n + 2) {
background-color: white;
}
tr:nth-of-type(2n + 3) {
background-color: #eee;
}
/* 4 */
tr td input:checked + label {
color: red;
}
/* 5 */
td:nth-of-type(2) {
vertical-align: 10px;
}
/* 6 */
td:nth-of-type(2):first-letter {
float: left;
font-size: 300%;
font-weight: bold;
vertical-align: top;
text-decoration: none;
line-height: 46px;
}
</style>
</head>
<body>
<table>
<tr>
<th>Scoville heat units</th>
<th>Examples</th>
<th width="100"></th>
</tr>
<tr>
<td>16,000,000,000</td>
<td><a href="/wiki/Resiniferatoxin" title="Resiniferatoxin (16,000,000,000)">Resiniferatoxin</a></td>
<td><input type="checkbox"><label>Tried it!</label></td>
</tr>
<tr>
<td>5,300,000,000</td>
<td><a href="/wiki/Tinyatoxin" title="Tinyatoxin (5,300,000,000)">Tinyatoxin</a></td>
<td><input type="checkbox"><label>Tried it!</label></td>
</tr>
<tr>
<td>16,000,000</td>
<td><a href="/wiki/Capsaicin" title="Capsaicin (16,000,000)">Capsaicin</a></td>
<td><input type="checkbox"><label>Tried it!</label></td>
</tr>
<tr>
<td>15,000,000</td>
<td><a href="/wiki/Dihydrocapsaicin" title="Dihydrocapsaicin (15,000,000)">Dihydrocapsaicin</a></td>
<td><input type="checkbox"><label>Tried it!</label></td>
</tr>
<tr>
<td>9,200,000</td>
<td><a href="/wiki/Nonivamide" title="Nonivamide (9,200,000)">Nonivamide</a></td>
<td><input type="checkbox"><label>Tried it!</label></td>
</tr>
<tr>
<td>9,100,000</td>
<td><a href="/wiki/Nordihydrocapsaicin" title="Nordihydrocapsaicin (9,100,000)">Nordihydrocapsaicin</a></td>
<td><input type="checkbox"><label>Tried it!</label></td>
</tr>
<tr>
<td>8,600,000</td>
<td><a href="/wiki/Homocapsaicin" title="Homocapsaicin (6,600,000)">Homocapsaicin</a></td>
<td><input type="checkbox"><label>Tried it!</label></td>
</tr>
<tr>
<td>160,000</td>
<td><a href="/wiki/Shogaol" title="Shogaol (160,000)">Shogaol</a></td>
<td><input type="checkbox"><label>Tried it!</label></td>
</tr>
<tr>
<td>100,000</td>
<td><a href="/wiki/Piperine" title="Piperine (100,000)">Piperine</a></td>
<td><input type="checkbox"><label>Tried it!</label></td>
</tr>
<tr>
<td>60,000</td>
<td><a href="/wiki/Gingerol" title="Gingerol (60,000)">Gingerol</a></td>
<td><input type="checkbox"><label>Tried it!</label></td>
</tr>
</table>
<div>
<h1>The Task:</h1>
<p>In this exercise, you'll turn a boring table above into an exciting table (see image below) using selectors and basic properties. It's going to be hot, hot, hot!</p>
<ol>
<li>Add a rule that will make the first row of the table bold.</li>
<li>Add a rule that will make the first cell in each data row have a red background.</li>
<li>Add a rule that will "zebra stripe" the backgrounds of the rows, alternating between white and <code>#eee</code>.</li>
<li>Add a rule that will turn the label red when the checkbox is clicked.</li>
<li>Add a rule that will make the first letter of the pepper name huge.</li>
<li>Add a rule that will find any pepper with hotness above 1 billion and color the link red.</li>
</ol>
<img src="exercise_tables.png" alt="Result image">
</body>
</html>