Skip to content

Commit 4107736

Browse files
committed
Add .prettierrc and format HTML code
1 parent 6778ac4 commit 4107736

File tree

2 files changed

+43
-39
lines changed

2 files changed

+43
-39
lines changed

.prettierrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"tabWidth": 4,
3+
"printWidth": 80
4+
}

index.html

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
11
<!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
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>
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>
4242
</html>

0 commit comments

Comments
 (0)