forked from edcctessa/web-project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.html
78 lines (72 loc) · 1.56 KB
/
example.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
<!DOCTYPE html>
<html lang="en-US">
<head>
<title>Code to Put on Github for students</title>
<meta charset="UTF-8">
<title>Forms Complete Example</title>
<style type="text/css">
body {
margin: 2em 5em;
font-family:Georgia,sans-serif;
}
h1, legend {
}
label, input, select {
display:block;
}
input, select {
margin-bottom: 1em;
}
fieldset {
margin-bottom: 2em;
padding: 1em;
}
fieldset fieldset {
margin-top: 1em;
margin-bottom: 1em;
}
input[type="checkbox"] {
display:inline;
}
.range {
margin-bottom:1em;
}
.card-type input, .card-type label {
display:inline-block;
}
</style>
</head>
<form id="register">
<h1>HTML5 Form with Validation</h1>
<fieldset>
<legend>Personal details</legend>
<div>
<label>First Name
<input id="given-name" name="given-name" placeholder="First name only" required="" autofocus="" type="text">
</label>
</div>
<div>
<label>Last Name
<input id="family-name" name="family-name" placeholder="Last name only" required="" autofocus="" type="text">
</label>
</div>
<div>
<label>Email
<input id="email" name="email" placeholder="example@domain.com" required="" type="email">
</label>
</div>
<div>
<label>URL
<input id="url" name="url" placeholder="http://mysite.com" type="url">
</label>
</div>
<div>
<label>Telephone
<input id="phone" name="phone" placeholder="Eg. 425-555-5555" required="" type="tel">
</label>
</div>
<button type="submit">Submit</button>
</fieldset>
</form>
</body>
</html>