Skip to content

Commit 6778ac4

Browse files
committed
Format HTML code
1 parent 3de3261 commit 6778ac4

File tree

1 file changed

+41
-16
lines changed

1 file changed

+41
-16
lines changed

index.html

Lines changed: 41 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,42 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
3-
<head>
4-
<title>HTML Form Validation</title>
5-
</head>
6-
<body>
7-
<h1>HTML Form Validation</h1>
8-
<form>
9-
<label for="name">Name: </label><input type="text" name="name" minlength="2" required><br>
10-
<label for="date">Date: </label><input type="text" name="date" pattern="\d{2}/\d{2}/\d{4}" required><br>
11-
<label for="email">Email: </label><input type="text" name="email" pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$" required><br>
12-
<label for="website">Website: </label><input type="text" name="website" pattern="(https?://)?[a-zA-Z0-9.-]+\.[a-zA-Z]{2,3}(\/[^\s]*)?" required><br>
13-
<label for="phone">Phone Number: </label><input type="text" name="phone" pattern="\d{3}-?\d{3}-?\d{4}" required><br>
14-
<button type="submit">Submit</button>
15-
</form>
16-
</body>
17-
</html>
3+
<head>
4+
<title>HTML Form Validation</title>
5+
</head>
6+
<body>
7+
<h1>HTML Form Validation</h1>
8+
<form>
9+
<label for="name">Name: </label
10+
><input type="text" name="name" minlength="2" required /><br />
11+
<label for="date">Date: </label
12+
><input
13+
type="text"
14+
name="date"
15+
pattern="\d{2}/\d{2}/\d{4}"
16+
required
17+
/><br />
18+
<label for="email">Email: </label
19+
><input
20+
type="text"
21+
name="email"
22+
pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$"
23+
required
24+
/><br />
25+
<label for="website">Website: </label
26+
><input
27+
type="text"
28+
name="website"
29+
pattern="(https?://)?[a-zA-Z0-9.-]+\.[a-zA-Z]{2,3}(\/[^\s]*)?"
30+
required
31+
/><br />
32+
<label for="phone">Phone Number: </label
33+
><input
34+
type="text"
35+
name="phone"
36+
pattern="\d{3}-?\d{3}-?\d{4}"
37+
required
38+
/><br />
39+
<button type="submit">Submit</button>
40+
</form>
41+
</body>
42+
</html>

0 commit comments

Comments
 (0)