-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtesting.html
53 lines (40 loc) · 1.87 KB
/
testing.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<form action="https://httpbin.org/post" method="post">
<fieldset>
<label for="first_name">First Name</label>
<input type="text" id="first_name" name="first_name">
<label for="last_name">Last Name</label>
<input type="text" id="last_name" name="last_name">
</fieldset>
Legend
The legend element is used to give field sets a heading or caption so the user can see what a grouping of inputs is for.
To create a legend, we use the <legend> element with the text we want to display within its opening and closing tags. A legend should always come right after an opening fieldset tag:
<fieldset>
<legend>Contact Details</legend>
<label for="name">Name:</label>
<input type="text" id="name" name="name">
<label for="phone_number">Phone Number:</label>
<input type="tel" id="phone_number" name="phone_number">
<label for="email">Email:</label>
<input type="email" id="email" name="email">
</fieldset>
<fieldset>
<legend>Delivery Details</legend>
<label for="street_address">Street Address:</label>
<input type="text" id="street_address" name="street_address">
<label for="city">City:</label>
<input type="text" id="city" name="city">
<label for="zip_code">Zip Code:</label>
<input type="text" id="zip_code" name="zip_code">
</fieldset>
</form>
<script src="testing.js"></script>
</body>
</html>