-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.html
119 lines (116 loc) · 5.47 KB
/
main.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Quiz practice project">
<title>Document</title>
<link rel="stylesheet" type="text/css" href="style.css"/>
<title>Quiz</title>
</head>
<body>
<header>
<img id="logo" src="https://cdn.freecodecamp.org/platform/universal/fcc_primary.svg" alt="freeCodeCamp">
<h1>HTML/CSS Quiz</h1>
<nav>
<ul>
<!--make the <a> href == elements id tag to search a page using <a>-->
<li><a href="#student-info">INFO</a></li>
<li><a href="#html-questions">HTML</a></li>
<li><a href="#css-questions">CSS</a></li>
</ul>
</nav>
</header>
<main>
<form action="https://freecodecamp.org/practice-project/accessibility-quiz" method="post">
<!--'aria-labelledby' is like '<label>' but does not have a visual label
make 'aria-labelledby' == to elements id to relate the two
good for titles instead of labels-->
<section role="region" aria-labelledby="student-info">
<h2 id="student-info">Student Info</h2>
<div class="info">
<label for="name">Name:</label>
<input id="name" type="text" name="name"/>
</div>
<div class="info">
<label for="email">Email:</label>
<input id="email" type="email" name="email"/>
</div>
<div class="info"><label for="DOB">DOB:</label>
<input id="DOB" type="date" name="DOB"/>
</div>
</section>
<section role="region" aria-labelledby="html-questions">
<h2 id="html-questions">HTML Questions</h2>
<div class="question-block">
<!--'class="sr-only"' only screen readers can read text enclosed in tags-->
<h3>1<span class="sr-only">Question</span></h3>
<fieldset class="question" name="question">
<legend>Are you happy?</legend>
<ul class="answers-list">
<li>
<label for="q1-a1">
<input id="q1-a1" type="radio" name="answer" value="True"> True
</label>
</li>
<li>
<label for="q1-a2">
<input id="q1-a2" type="radio" name="answer" value="False"> False
</label>
</li>
</ul>
</fieldset>
</div>
<div class="question-block">
<h3>2<span class="sr-only">Question</span></h3>
<fieldset class="question" name="question">
<legend>Are you there?</legend>
<ul class="answers-list">
<li>
<label for="q2-a1">
<input id="q2-a1" type="radio" name="answer2" value="True"> True
</label>
</li>
<li>
<label for="q2-a2">
<input id="q2-a2" type="radio" name="answer2" value="False"> False
</label>
</li>
</ul>
</fieldset>
</div>
</section>
<section role="region" aria-labelledby="css-questions">
<h2 id="css-questions">CSS Questions</h2>
<div class="formrow">
<div class="question-block">
<label for="css1">What is CSS?</label>
</div>
<div class="answer">
<select id="css1" name="css1" required>
<option value="">Select an option</option>
<option value="yes">Yes</option>
<option value="no">No</option>
</select>
</div>
<div class="question-block">
<label for="css2">What is CSS?</label>
</div>
<div class="answer">
<textarea id="css2" rows="3" cols="20" name="css2"></textarea>
</div>
</div>
</section>
<button type="submit">Send</button>
</form>
<footer>
<address>
<a href="https://freecodecamp.org">freeCodeCamp</a><br />
San Francisco<br />
California<br />
USA
</address>
</footer>
</main>
</body>
</html>