Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
7b41ae7
Added form code
RaeesStevens Sep 13, 2026
e8ae82b
created style.css file and linked to html
RaeesStevens Sep 13, 2026
8ae5858
added a : after Customer email
RaeesStevens Sep 13, 2026
d01406b
added colon after customer email
RaeesStevens Sep 13, 2026
7583afd
updated background colour on CSS
RaeesStevens Sep 13, 2026
6314e87
updated labels and body on CSS
RaeesStevens Sep 13, 2026
831f71a
Updated CSS with select and input fields
RaeesStevens Sep 13, 2026
97df358
changed label font color
RaeesStevens Sep 13, 2026
031dd37
added fieldset styling
RaeesStevens Sep 13, 2026
9823b8e
restarted CSS with heading styling
RaeesStevens Sep 13, 2026
2fca7b5
Testing body and heading styling
RaeesStevens Sep 13, 2026
6a29c30
updated body in CSS
RaeesStevens Sep 13, 2026
70180cc
added legend and fieldset in CSS
RaeesStevens Sep 13, 2026
6406563
trying form CSS layout
RaeesStevens Sep 13, 2026
9e88ab5
centered h1, added button colors
RaeesStevens Sep 13, 2026
1ed6d74
update special label
RaeesStevens Sep 13, 2026
8c3c805
update labels on html
RaeesStevens Sep 13, 2026
8d3ea27
made label font size small
RaeesStevens Sep 13, 2026
942d555
final updates
RaeesStevens Sep 13, 2026
ab37c3b
added pattern for two non-space characters
RaeesStevens Sep 19, 2026
a0b0cba
updated read.me
RaeesStevens Sep 19, 2026
4f2424f
updated read me and CSS
RaeesStevens Sep 19, 2026
dfba1c7
Added inline-blockd isplay to size
RaeesStevens Sep 19, 2026
9cd31c8
Updated submit buttom on html
RaeesStevens Sep 19, 2026
eaa2c1e
Added size label
RaeesStevens Sep 19, 2026
5f4166a
Testing frid display for form
RaeesStevens Sep 19, 2026
38a0689
updated html with div classes
RaeesStevens Sep 19, 2026
783c8ce
Added margin-bottom to classes in CSS
RaeesStevens Sep 19, 2026
8b2150b
Added size-row to CSS
RaeesStevens Sep 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions Form-Controls/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

<!--{{<objectives>}}>-->

- [ ] Interpret requirements and check against a list of criteria
- [ ] Write a valid form
- [ ] Test with Devtools
- [ ] Refactor using Devtools
- [ ] Use version control by committing often and pushing regularly to GitHub
- [ ] Develop the habit of writing clean, well-structured, and error-free code
- [x] Interpret requirements and check against a list of criteria
- [x] Write a valid form
- [x] Test with Devtools
- [x] Refactor using Devtools
- [x] Use version control by committing often and pushing regularly to GitHub
- [x] Develop the habit of writing clean, well-structured, and error-free code
<!--{{<objectives>}}>-->

## Task
Expand Down Expand Up @@ -39,18 +39,18 @@ Do not write a form action for this project.

Let's write out our testable criteria. Check each one off as you complete it.

- [ ] I have only used HTML and CSS.
- [ ] I have not used any JavaScript.
- [x] I have only used HTML and CSS.
- [x] I have not used any JavaScript

### HTML

- [ ] My form is semantic HTML.
- [ ] All inputs have associated labels.
- [ ] My Lighthouse Accessibility score is 100.
- [ ] I require a valid name.
- [ ] I require a valid email.
- [ ] I require one colour from a defined set of 3 colours.
- [ ] I require one size from a defined set of 6 sizes.
- [x] My form is semantic HTML.
- [x] All inputs have associated labels.
- [x] My Lighthouse Accessibility score is 100.
- [x] I require a valid name.
- [x] I require a valid email.
- [x] I require one colour from a defined set of 3 colours.
- [x] I require one size from a defined set of 6 sizes.

### Developers must adhere to professional standards.

Expand All @@ -59,10 +59,10 @@ Let's write out our testable criteria. Check each one off as you complete it.
These practices reflect the level of quality expected in professional work.
They ensure your code is reliable, maintainable, and presents a polished, credible experience to users.

- [ ] My HTML code has no errors or warnings when validated using https://validator.w3.org/
- [ ] My code is consistently formatted
- [ ] My page content is free of typos and grammatical mistakes
- [ ] I commit often and push regularly to GitHub
- [x] My HTML code has no errors or warnings when validated using https://validator.w3.org/
- [x] My code is consistently formatted
- [x] My page content is free of typos and grammatical mistakes
- [x] I commit often and push regularly to GitHub

## Resources
- [MDN: Form controls](https://developer.mozilla.org/en-US/docs/Learn/Forms)
Expand Down
46 changes: 44 additions & 2 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<title>My form exercise</title>
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="style.css">

</head>
<body>
<header>
Expand All @@ -17,11 +19,51 @@ <h1>Product Pick</h1>
<!--
try writing out the requirements first as comments
this will also help you fill in your PR message later-->
</form>
<div class="field-row">
<label for="name">Customer Name:</label>
<input type="text" id="name" minlength="2" pattern=".*\S.*\S.*" required>

<label for="email">Customer Email:</label>
<input type="email" id="email" name="email" required>
</div>

<fieldset>
<legend>T-shirt color:</legend>

<div class="color-options">
<input type="radio" id="blue" name="color" value="blue" required>
<label for="blue">Blue</label>

<input type="radio" id="black" name="color" value="black" required>
<label for="black">Black</label>

<input type="radio" id="grey" name="color" value="grey" required>
<label for="grey">Grey</label>
</div>

<div class="size-row">
<label for="size">Size</label>
<select id="size" name="size" required>

<option value="">--select a size--</option>
<option value="XS">XS</option>
<option value="S">S</option>
<option value="M">M</option>
<option value="L">L</option>
<option value="XL">XL</option>
<option value="XXL">XXL</option>
</select>
</div>

<input type="submit" value="Submit">

</fieldset>

</form>
</main>
<footer>
<!-- change to your name-->
<p>By HOMEWORK SOLUTION</p>
<p>By Raees Stevens</p>
</footer>
</body>
</html>
9 changes: 9 additions & 0 deletions Form-Controls/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.field-row {
margin-bottom: 1em;
}
.color-options {
margin-bottom: 0.75em;
}
.size-row {
margin-top: 0.5em;
}