Skip to content

Commit f0f6330

Browse files
committed
created forms and styled them
1 parent d28242a commit f0f6330

2 files changed

Lines changed: 73 additions & 6 deletions

File tree

‎Form-Controls/index.html‎

Lines changed: 56 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<meta charset="utf-8" />
55
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
66
<title>My form exercise</title>
7+
<link rel="stylesheet" href="style.css"/>
78
<meta name="description" content="" />
89
<meta name="viewport" content="width=device-width, initial-scale=1" />
910
</head>
@@ -13,15 +14,64 @@ <h1>Product Pick</h1>
1314
</header>
1415
<main>
1516
<form>
16-
<!-- write your html here-->
17-
<!--
18-
try writing out the requirements first as comments
19-
this will also help you fill in your PR message later-->
17+
<!-- write your html here-->
18+
Enter your name:
19+
<input type="text" placeholder="Enter your name" name="aName" size="16" minlength="2" maxlength="16"required>
20+
21+
<!-- the size attribute control how wide the text box, "how many characters it can control-->
22+
<!-- the minlength attribute control the minimum number of characters required-->
23+
<!-- the maxlength attribute control the maximum number of characters required-->
24+
<!-- the placeholder attribute provide a hint for the user on what to enter-->
25+
<!-- the required attribute ensures the user fills out the field-->
26+
<p>Choose your T-shirt color:</p>
27+
<!-- choosing the radio buttons for color selection-->
28+
<p>please select a color:</p>
29+
<p>
30+
<input type="radio" name="color" id="red" value="Red" placeholder="Red" required>
31+
<label for="red"label>Red</label><br>
32+
<input type="radio" name="color" id="brown" value="Brown" placeholder="Brown" required>
33+
<label for="brown">Brown</label><br>
34+
<input type="radio" name="color" id="black" value="Black" placeholder="Black" required>
35+
<label for="black">Black</label><br>
36+
</p>
37+
38+
<!-- a list of suggestions using the list attribute and the datalist element -->
39+
<!-- I need to fix the labels to increase accessbility to 100%-->
40+
<label>
41+
Select your T-shirt size:
42+
<input list="SizeList" name="T-shirt Size" placeholder=" Choose your size" required><br>
43+
</label>
44+
<datalist id="SizeList">
45+
46+
<option value="XS">
47+
<option value="S">
48+
<option value="M">
49+
<option value="L">
50+
<option value="XL">
51+
<option value="XXL">
52+
53+
</datalist>
54+
2055
</form>
56+
57+
<p>
58+
<style>
59+
input:invalid{background: rgb(253, 251, 253);}
60+
input:valid{background: rgb(253, 251, 253);}
61+
</style>
62+
Enter your email:
63+
<input type="email" placeholder="Enter your email" required>
64+
</p>
65+
<!--The input type="email" is used so the browser can validatae the email address format-->
66+
<!--the style tag is used to style the input box. CSS pseudo-classes :valid or :invalid to check if the email is valid and notify the user-->
67+
68+
<form> <label> <input type="submit"> <input type="resit">
69+
</label>
70+
</form>
2171
</main>
2272
<footer>
2373
<!-- change to your name-->
24-
<p>By HOMEWORK SOLUTION</p>
74+
<p>Rawan@</p>
2575
</footer>
2676
</body>
27-
</html>
77+
</html>

‎Form-Controls/style.css‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
body { color: #141414;
2+
3+
background-color: #6aa57e;
4+
5+
font-family: Georgia;
6+
7+
8+
9+
h1{
10+
11+
font-family: sans-serif;
12+
color: rgba(15, 15, 15, 0.267);
13+
background-color: #f5eeda;
14+
text-align: center;
15+
font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
16+
17+
}

0 commit comments

Comments
 (0)