Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
2d4ee1f
Added each of the required inputs needed, not right type yet
SABuilds May 6, 2026
8212ba3
Moved comments
SABuilds May 6, 2026
1bdcd94
My own name added
SABuilds May 7, 2026
9ab7553
radio created for colour and for attribute added for each label
SABuilds May 7, 2026
55e0651
radio for size but plan to change to select
SABuilds May 7, 2026
ef2f89a
switched from using radio for size to using select
SABuilds May 7, 2026
e8ef97d
Added minimum character length to the name input
SABuilds May 7, 2026
cc5dee9
corrrection to first input element
SABuilds May 7, 2026
2f4c453
Added required attribute to size and colour, labelled "select a colou…
SABuilds May 7, 2026
3fa36c4
added id to select element
SABuilds May 7, 2026
1367253
removed value attribute for label. Added value to the input element
SABuilds May 7, 2026
5bfcdb6
removed old comments that are no longer needed
SABuilds May 7, 2026
875e3b0
Added a style.css file to improve accessibility for users
SABuilds May 7, 2026
5d8d095
add border spacing to id="name"
SABuilds May 7, 2026
3d58ced
added id to label and reflected in css
SABuilds May 7, 2026
b93fb03
reverted changes from previous commit
SABuilds May 7, 2026
0c3d909
done the same for css
SABuilds May 7, 2026
3f77e46
defined size of #name
SABuilds May 7, 2026
362400d
removed width from #name
SABuilds May 7, 2026
7c2bfa2
added sizing to #email, #red, #blue, #purple
SABuilds May 7, 2026
eea81ab
readme file edited
SABuilds May 9, 2026
0982e06
read me file actually corrected
SABuilds May 9, 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 All @@ -34,18 +34,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 @@ -54,10 +54,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
53 changes: 46 additions & 7 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,61 @@
<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>
<h1>Product Pick</h1>
</header>
<main>
<form>
<!-- write your html here-->
<!--
try writing out the requirements first as comments
<!--What is the customer's name? I must collect this data and ensure it contains at least two non-space characters.-->
<div>
<label for="name">Name</label>
<input type="text" id="name" required minlength="2">
</div>
<!--What is the customer's email? I must make sure the email is valid. Email addresses follow a consistent pattern.-->
<div>
<label for="email">Email</label>
<input type="email" id="email" required>
</div>
<!--What colour should this T-shirt be? I must provide 3 options. How will I ensure they do not choose other colours?-->
<div>
<label>Select a colour</label>
<div>
<label for="red">Red</label>
<input type="radio" id="red" name="colour" value="Red" required>
</div>
<div>
<label for="blue">Blue</label>
<input type="radio" id="blue" name="colour" value="Blue" required>
</div>
<div>
<label for="purple">Purple</label>
<input type="radio" id="purple" name="colour" value="Purple" required>
</div>
</div>
<!--What size does the customer want? I must provide the following 6 options: XS, S, M, L, XL, XXL-->
<div>
<label for="size">Size of T-shirt</label>
<select id="size" name="size" required>
<option value="" disabled selected>Select an Option</option>
<option value="xs">Extra Small</option>
<option value="s">Small</option>
<option value="m">Medium</option>
<option value="l">Large</option>
<option value="xl">Extra Large</option>
<option value="xxl">Extra-Extra Large</option>
</select>
</div>
<button type="submit">Submit</button>
<button type="reset">Reset</button>
<!--try writing out the requirements first as comments
this will also help you fill in your PR message later-->
</form>
</form>
</main>
<footer>
<!-- change to your name-->
<p>By HOMEWORK SOLUTION</p>
<p>By Shahriar Ahmed</p>
</footer>
</body>
</html>
</html>
18 changes: 18 additions & 0 deletions Form-Controls/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#name {
height: 24px;
}
#email {
height: 24px;
}
#red {
height: 24px;
width: 24px;
}
#blue {
height: 24px;
width: 24px;
}
#purple {
height: 24px;
width: 24px;
}
Loading