-
Notifications
You must be signed in to change notification settings - Fork 0
/
practice1.css
65 lines (55 loc) · 1.31 KB
/
practice1.css
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
/*
Qs1. Give the h1 header a unique id - “mainTopic” & set its color to blue using the id
selector.
Qs2. Align all the text in the page to the center using a universal selector.
Qs3. Change the font style of all heading tags in the page to ‘Georgia’.
Qs4. Set the color of all the paragraphs to white & background color to cornflowerblue.
(Without using the element selector - ‘p’)
Qs5. Select all buttons inside div and change their background color to purple & text
color to azure.
PART B (Pseduo class & elements)
Qs6. Change the button background color to yellow & text color to blue when we hover
over it.
Qs7. Change the color of every odd numbered paragraph to yellow. (Paragraph 1 & 3)
Qs8. Change the color of the first letter of h1 heading to red.
Qs9. Set the text color of the checkbox label to dark green when the checkbox is
ticked.
*/
#mainTopic
{
color: blue;
}
*{
text-align: center;
}
h1,h3,h5
{
font-family: Georgia, 'Times New Roman', Times, serif;
}
.content
{
color: white;
background-color: cornflowerblue;
}
div button
{
background-color: purple;
color: azure;
}
button:hover
{
background-color: yellow;
color:blue
}
p:nth-of-type(2n+1)
{
color: yellow;
}
h1::first-letter
{
color: red;
}
input[type="checkbox"]:checked+label
{
color:darkgreen
}