-
Notifications
You must be signed in to change notification settings - Fork 9
/
forms-labels.html
75 lines (64 loc) · 2.27 KB
/
forms-labels.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
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<title>Accessibility Library</title>
<link href="https://fonts.googleapis.com/css?family=Nunito:400,600,700,800|Roboto:400,500,700" rel="stylesheet" />
<link type="text/css" href="assets/css/theme.css" rel="stylesheet" />
<link type="text/css" href="assets/css/main.css" rel="stylesheet" />
</head>
<body>
<div class="page">
<header>
<a href="/" class="title text-dark">Accessibility Library</a>
<div class="lvivcss-logo">
<img src="./assets/images/lviv-css-logo.png" alt="" height="24" />
</div>
</header>
<nav>
<ul>
<li><a href="#">Aria attributes</a></li>
<li><a href="#">Live example</a></li>
<li><a href="#">Code sample</a></li>
</ul>
</nav>
<main>
<h1>Form Labels</h1>
<p>
Label element to associate text with form elements explicitly.
</p>
<h2 class="mt-sm">Attributes</h2>
<table>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
<tr>
<td><code>for</code></td>
<td>Attribute associates the label with a control element</td>
</tr>
</table>
<h2 class="mt-sm">Live Example</h2>
<section>
<label for="firstname">First name:</label>
<input type="text" name="firstname" id="firstname"><br>
<input type="checkbox" name="subscribe" id="subscribe">
<label for="subscribe">Subscribe to newsletter</label>
</section>
<h2 class="mt-sm">Code sample</h2>
<section>
<code>
<label for="firstname">First name:</label> <br>
<input type="text" name="firstname" id="firstname"> <br>
<input type="checkbox" name="subscribe" id="subscribe"><br>
<label for="subscribe">Subscribe to newsletter</label>
</code>
</section>
</main>
<footer>
Accessibility Library created by <mark>Anndrii Deputovych</mark> on LvivCSS'19.
</footer>
</div>
</body>
</html>