Skip to content
This repository was archived by the owner on Apr 18, 2025. It is now read-only.

Commit fa5c8bf

Browse files
html code
1 parent bcc71f6 commit fa5c8bf

File tree

2 files changed

+104
-0
lines changed

2 files changed

+104
-0
lines changed

<!DOCTYPE html>.html

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>T-Shirt Order Form</title>
7+
<link rel="stylesheet" type="text/css" href="styles.css" />
8+
</head>
9+
<body>
10+
<h2>T-Shirt Order Form</h2>
11+
12+
<form>
13+
<!-- Customer's Name -->
14+
<label for="name">Customer Name <span class="required">*</span></label>
15+
<input
16+
type="text"
17+
id="name"
18+
name="name"
19+
required
20+
pattern="[A-Za-z\s]{2,50}"
21+
title="Name should only contain letters and spaces, and be 2-50 characters long."
22+
placeholder="Enter your full name"
23+
/>
24+
25+
<!-- Customer's Email -->
26+
<label for="email">Email <span class="required">*</span></label>
27+
<input
28+
type="email"
29+
id="email"
30+
name="email"
31+
required
32+
placeholder="Enter your email address"
33+
/>
34+
35+
<!-- T-shirt Colour -->
36+
<label for="color"
37+
>Choose T-shirt Colour <span class="required">*</span></label
38+
>
39+
<select id="color" name="color" required>
40+
<option value="">Select a color</option>
41+
<option value="red">Red</option>
42+
<option value="blue">Blue</option>
43+
<option value="black">Black</option>
44+
</select>
45+
46+
<!-- T-shirt Size -->
47+
<label for="size"
48+
>Choose T-shirt Size <span class="required">*</span></label
49+
>
50+
<select id="size" name="size" required>
51+
<option value="">Select a size</option>
52+
<option value="XS">XS</option>
53+
<option value="S">S</option>
54+
<option value="M">M</option>
55+
<option value="L">L</option>
56+
<option value="XL">XL</option>
57+
<option value="XXL">XXL</option>
58+
</select>
59+
60+
<!-- Delivery Date -->
61+
<label for="delivery"
62+
>Preferred Delivery Date <span class="required">*</span></label
63+
>
64+
<input
65+
type="date"
66+
id="delivery"
67+
name="delivery"
68+
required
69+
min=""
70+
max=""
71+
placeholder="Select a delivery date within the next 4 weeks"
72+
/>
73+
74+
<!-- Submit Button -->
75+
<button type="submit">Submit Order</button>
76+
</form>
77+
</body>
78+
</html>

styles.css

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
body {
2+
font-family: Arial, sans-serif;
3+
}
4+
form {
5+
max-width: 400px;
6+
margin: 0 auto;
7+
}
8+
label,
9+
select,
10+
input {
11+
display: block;
12+
margin-bottom: 10px;
13+
}
14+
input[type="text"],
15+
input[type="email"],
16+
input[type="date"] {
17+
width: 100%;
18+
padding: 8px;
19+
}
20+
select {
21+
width: 100%;
22+
padding: 8px;
23+
}
24+
.required {
25+
color: red;
26+
}

0 commit comments

Comments
 (0)