Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
13488cc
Added a "Name" label and "input" criterial
MattCarolus10 Sep 8, 2026
3a43ad9
Added "Email" label and "input" criterial
MattCarolus10 Sep 8, 2026
1d6d397
Added "preferred color" label and input.
MattCarolus10 Sep 8, 2026
e1bc485
Added "preferred size" label and input
MattCarolus10 Sep 8, 2026
c80b1ad
Added "Submit" and "Reset" button
MattCarolus10 Sep 8, 2026
f1772a9
Added "Checkbox" options for preferred colors
MattCarolus10 Sep 8, 2026
eafa744
Changed "Preferred color" element from to "checkbox to "select"
MattCarolus10 Sep 8, 2026
5b91895
Added "preferrred T-Shirt size" options
MattCarolus10 Sep 8, 2026
a16c87e
"Name" non-space character character added
MattCarolus10 Sep 8, 2026
598ba35
Finalized two non-space character for name section
MattCarolus10 Sep 8, 2026
dbd3c48
Added "*" before my first "." in name pattern
MattCarolus10 Sep 8, 2026
02092cd
Required all aspect of form
MattCarolus10 Sep 9, 2026
969faa1
Completing checkbox on MD file
MattCarolus10 Sep 9, 2026
8a459e4
Formatted code
MattCarolus10 Sep 9, 2026
b60c704
Added "Selection an option" value to colors and sizes
MattCarolus10 Sep 9, 2026
35da72f
Made the value empty "value="" for colors and sizes
MattCarolus10 Sep 9, 2026
2d8766f
Added my name "Mathew Shaibu" to file
MattCarolus10 Sep 9, 2026
0f988b5
Deleted excess spaces in code
MattCarolus10 Sep 9, 2026
f3cbb52
Change name to all CAP
MattCarolus10 Sep 9, 2026
3640228
Completed all check boxes
MattCarolus10 Sep 9, 2026
fb25fc9
Changed a checked box to a small letter "x"
MattCarolus10 Sep 9, 2026
74f205a
Completed more checkbox 7 - 12
MattCarolus10 Sep 9, 2026
2a32c4e
changed "Name" to "Full name"'
MattCarolus10 Sep 10, 2026
083e688
add autocomplete for name and email
MattCarolus10 Sep 15, 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
86 changes: 61 additions & 25 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
@@ -1,27 +1,63 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>My form exercise</title>
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<body>
<header>
<h1>Product Pick</h1>
</header>
<main>
<form>
<!-- write your html here-->
<!--
try writing out the requirements first as comments
this will also help you fill in your PR message later-->
</form>
</main>
<footer>
<!-- change to your name-->
<p>By HOMEWORK SOLUTION</p>
</footer>
</body>
</html>

<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>My form exercise</title>
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>

<body>
<header>
<h1>Product Pick</h1>
</header>
<main>
<form>

<div>
<label for="name">Full Name:</label>
<input type="text" name="name" id="name" placeholder="Full name" required pattern=".*\S.*\S.*" autocomplete="name">
</div>

<div>
<label for="email">Email:</label>
<input type="email" name="email" id="email" placeholder="Email address" required autocomplete="email">
</div>
Comment on lines +19 to +27

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: Chrome Developer Tools and AI tools may provide useful insights into how we can further improve our implementation. While you are not required to follow their suggestions in every exercise, taking the time to consider them can often help us learn more effectively.

Here's an example,

Image


<div>
<label for="color">Preferred T-Shirt color:</label>
<select name="color" id="color" required>
<option value="">Select an option</option>
<option>Red</option>
<option>Yellow</option>
<option>Green</option>
</select>
</div>

<div>
<label for="size">Preferred T-Shirt size:</label>
<select name="size" id="size" required>
<option value="">Select an option</option>
<option>XS</option>
<option>S</option>
<option>M</option>
<option>L</option>
<option>XL</option>
<option>XXL</option>
</select>
</div>

<button type="submit">SUBMIT</button>
<button type="reset">RESET</button>

</form>
</main>
<footer>

<p>By MATHEW SHAIBU</p>
</footer>
</body>

</html>
Comment on lines +60 to +63

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code is well formatted. Are they formatted manually?

Suggestion:

  • Look up the benefits of using a code formatter.
  • Install the Prettier extension for VS Code, then:
    • Use VS Code's Format Document feature to format your code.
    • Optionally, enable Format On Save and Format On Paste to keep your code consistently formatted.

Resource: Visual Studio Code - Formatting

Note: The formatter may not work correctly if your code contains syntax errors.

@MattCarolus10 MattCarolus10 Sep 14, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I formatted it using the right click "format documents". Thanks for this comment I really appreciate it.

Loading