-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathform.html
More file actions
163 lines (153 loc) · 5.15 KB
/
form.html
File metadata and controls
163 lines (153 loc) · 5.15 KB
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Form Markup Example</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<style type="text/css">
body {
color: #515151;
font-family: Arial, sans serif;
font-size: 62.5%;
padding:3em;
}
fieldset {
border:none;
margin:0;
padding:0;
}
legend {
font-size:2em;
font-weight:normal;
}
.form-title {
font-size:4em;
}
label, input {
font-size:1.6em;
}
.field-row label {
display:block;
margin:0 0 10px;
}
.field-row .text-field {
padding: 12px 6px;
border-radius: 4px;
border: 1px solid #dadada;
}
.field-row,.checkbox-field-row,.radiobutton-field-row {
padding:20px 0;
}
.checkbox-list,.radiobutton-list,.dob {
margin:20px 0;
}
.dob .field-row {
display: inline-block;
padding-right:10px;
}
.dob .field-row label {
position: absolute;
top:-9999em;
left: -9999em;
}
.btn input {
font-size: 1.8em;
padding: 12px 16px;
}
.error span {
color:red;
display: block;
margin: 0 0 10px;
font-size:1.4em;
}
</style>
</head>
<body>
<form role="form">
<fieldset>
<legend class="form-title">Form Title</legend>
<div class="field-row">
<label for="textField">Text Label</label>
<input name="textField" id="textField" type="text" aria-required="true" required class="text-field" placeholder="Placeholder text" autofocus>
</div>
<div class="field-row">
<label for="emailField">Email</label>
<input name="emailField" id="emailField" type="email" class="text-field" aria-required="true" required placeholder="Enter a valid email address">
</div>
<div class="field-row">
<label for="passwordField">Password</label>
<input name="passwordField" id="passwordField" class="text-field" type="password">
</div>
<div class="field-row">
<div class="error"><span>Error message example</span></div>
<label for="telephoneField">Telephone</label>
<input name="telephoneField" id="telephoneField" class="text-field" type="tel">
</div>
<div class="field-row">
<label for="numberField">Number</label>
<input name="numberField" id="numberField" class="text-field" type="number">
</div>
<div class="checkbox-field-row">
<input name="singleCheckboxField" id="singleCheckboxField" type="checkbox">
<label for="singleCheckboxField">Single Checkbox</label>
</div>
<div class="radiobutton-field-row">
<div class="error"><span>Error message example</span></div>
<input name="singleRadioButtonField" id="singleRadioButtonField" type="radio">
<label for="singleRadioButtonField">Single Radiobutton</label>
</div>
<fieldset class="dob">
<legend>Date of Birth</legend>
<div class="field-row">
<label for="dayField">Day</label>
<input name="dayField" id="dayField" class="text-field" type="text" placeholder="DD">
</div>
<div class="field-row">
<label for="monthField">Month</label>
<input name="monthField" id="monthField" class="text-field" type="text" placeholder="MM">
</div>
<div class="field-row">
<label for="yearField">Year</label>
<input name="yearField" id="yearField" class="text-field" type="text" placeholder="YY">
</div>
</fieldset>
<fieldset class="checkbox-list">
<legend>Checkbox list</legend>
<div class="checkbox-field-row">
<input id="checkboxField1" name="checkboxlist" type="checkbox">
<label for="checkboxField1">item 1</label>
</div>
<div class="checkbox-field-row">
<input id="checkboxField2" name="checkboxlist" type="checkbox">
<label for="checkboxField2">item 2</label>
</div>
<div class="checkbox-field-row">
<input id="checkboxField3" name="checkboxlist" type="checkbox">
<label for="checkboxField3">item 3</label>
</div>
</fieldset>
<fieldset class="radiobutton-list">
<legend>Radiobutton list</legend>
<div class="radiobutton-field-row">
<input id="radioButtonField1" name="radiobuttonlist" type="radio">
<label for="radioButtonField1">item 1</label>
</div>
<div class="radiobutton-field-row">
<input id="radioButtonField2" name="radiobuttonlist" type="radio">
<label for="radioButtonField2">item 2</label>
</div>
<div class="radiobutton-field-row">
<input id="radioButtonField3" name="radiobuttonlist" type="radio">
<label for="radioButtonField3">item 3</label>
</div>
</fieldset>
<div class="btn-container">
<div class="btn">
<input type="button" value="Sign up">
</div>
</div>
</div>
</fieldset>
</form>
</body>
</html>