Skip to content

Commit d1fb3c6

Browse files
added comments to my code for the html and css
1 parent 893270c commit d1fb3c6

2 files changed

Lines changed: 11 additions & 7 deletions

File tree

Form-Controls/index.html

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,24 @@ <h1>Product Pick</h1>
1919

2020
<form method = "get" class = "form-container">
2121
<!-- write your html here-->
22-
<!--Requirements:
23-
1. What is the customer's name? I must collect this data and ensure it contains at least two non-space characters.
24-
2. What is the customer's email? I must make sure the email is valid. Email addresses follow a consistent pattern.
25-
3. What colour should this T-shirt be? I must provide 3 options. How will I ensure they do not choose other colours?
26-
4. What size does the customer want? I must provide the following 6 options: XS, S, M, L, XL, XXL-->
27-
22+
23+
<!-- All inputs are required and are labelled for accessibility and have corresponding name, for, and id attributes -->
24+
<!-- Asks for their forename name -->
2825
<label for = "forename"> Forename:</label>
2926
<input type = "text" name = "forename" id="forename" minlength="2" required>
3027
<br>
3128

29+
<!-- Asks for their surname -->
3230
<label for = "surname"> Surname: </label>
3331
<input type = "text" name = "surname" id="surname" minlength="2 " required>
3432
<br>
3533

34+
<!-- Asks for their email -->
3635
<label for = "email"> Email: </label>
3736
<input type = "email" name = "email" id="email" required>
3837
<br>
3938

39+
<!-- Gives them the options to choose between 3 colours -->
4040
<label for ="colour"> T-shirt Colour: </label>
4141
<select name = "colour" id = "colour" required>
4242
<option>White</option>
@@ -45,6 +45,7 @@ <h1>Product Pick</h1>
4545
</select>
4646
<br>
4747

48+
<!-- Gives them the option to choose between 6 sizes-->
4849
<label for="size"> T-shirt Size:</label>
4950
<select name = "size" id = "size" required>
5051
<option>XS</option>
@@ -56,13 +57,13 @@ <h1>Product Pick</h1>
5657
</select>
5758
<br>
5859

60+
<!-- Submit button -->
5961
<button type ="submit">Submit</button>
6062

6163
</form>
6264
</main>
6365

6466
<footer>
65-
<!-- change to your name-->
6667
<p>By Muhammad-Burhan Mustafa</p>
6768
</footer>
6869

Form-Controls/style.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* Creates a container for the form that is also centered*/
12

23
.form-container{
34
display: flex;
@@ -9,6 +10,7 @@
910
font-size: 28px;
1011
}
1112

13+
/* Ensures that inputs and options are standard size and centered*/
1214
.form-container input,
1315
.form-container option{
1416
font-size: 24px;
@@ -19,6 +21,7 @@
1921
margin-right:auto;
2022
}
2123

24+
/* Ensures that select and buttons are a standard size and centered*/
2225
.form-container select,
2326
.form-container button{
2427
max-width:325px;

0 commit comments

Comments
 (0)