Skip to content

Glasgow | May-2025 | Salah Ahmed | Form Control #543

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
24 changes: 12 additions & 12 deletions Form-Controls/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

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

- [ ] Interpret requirements and check against a list of criteria
- [ ] Write a valid form
- [ ] Test with Devtools
- [ ] Refactor using Devtools
- [x] Interpret requirements and check against a list of criteria
- [x] Write a valid form
- [x] Test with Devtools
- [x] Refactor using Devtools
<!--{{<objectives>}}>-->

## Task
Expand All @@ -30,18 +30,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 used HTML only.
- [x] I have used HTML only.
- [x] I have not used any CSS or JavaScript.

### HTML

- [ ] My form is semantic html.
- [ ] All inputs have associated labels.
- [ ] My Lighthouse Accessibility score is 100.
- [ ] I require a valid name. I have defined a valid name as a text string of two characters or more.
- [ ] 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. I have defined a valid name as a text string of two characters or more.
- [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.

## Resources

Expand Down
42 changes: 36 additions & 6 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,49 @@
</head>
<body>
<header>
<h1>Product Pick</h1>
<h1>Form Controls</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-->
<div>
<label for="name">Name:</label>
<input type="text" id="name" name="name" minlength="2" required />
</div>
<br/>
<div>
<label for="email">Email:</label>
<input type="email" id="email" name="email" required />
</div>
<br/>

<fieldset>
<legend>Color and Size</legend>
<label for="color">Choose a color:</label>
<select id="color" name="color">
<option value="Black">Black</option>
<option value="White">White</option>
<option value="Blue">Blue</option>
</select>

<label for="size">Choose a size:</label>
<select id="size" name="size">
<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>
</fieldset>
<br/>
<input type="submit" value="Submit" />
<input type="reset" value="Reset" />

</form>
</main>
<footer>
<!-- change to your name-->
<h2>By HOMEWORK SOLUTION</h2>
<h2>By Salah Ahmed</h2>
</footer>
</body>
</html>
35 changes: 22 additions & 13 deletions Wireframe/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,34 @@
<body>
<header>
<h1>Wireframe</h1>
<p>
This is the default, provided code and no changes have been made yet.
</p>
<p>A wireframe is a simple sketch of a web page layout. It helps plan the structure and user flow before designing or coding</p>
</header>

<main>
<article>
<img src="placeholder.svg" alt="" />
<h2>Title</h2>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam,
voluptates. Quisquam, voluptates.
</p>
<a href="">Read more</a>
<img src="https://media.geeksforgeeks.org/wp-content/uploads/20240702120959/Readme1.png" alt="Example of a README file displayed in a text editor" />
<h2>What is the purpose of a README file?</h2>
<p>A README file explains what your project does, how to use it, and any setup or installation steps.</p>
<a href="https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-readmes">Read more</a>
</article>

<article>
<img src="https://cdn.careerfoundry.com/en/wp-content/uploads/2021/01/Wiregraming_PillarPage.webp?x47357" alt="Low-fidelity wireframe example showing page layout structure" />
<h2>What is the purpose of a wireframe?</h2>
<p>A wireframe is a simple sketch of a web page layout. It helps plan the structure and user flow before designing or coding.</p>
<a href="https://www.productplan.com/glossary/wireframe/">Read more</a>
</article>

<article>
<img src="https://i2.wp.com/digitalvarys.com/wp-content/uploads/2019/06/image-7.png?fit=640%2C311&ssl=1" alt="Diagram illustrating Git branches and merging process" />
<h2>What is a branch in Git?</h2>
<p>A Git branch lets you work on different versions of a project at the same time without affecting the main codebase.</p>
<a href="https://www.w3schools.com/git/git_branch.asp">Read more</a>
</article>
</main>

<footer>
<p>
This is the default, provided code and no changes have been made yet.
</p>
<p>Done By Salah Ahmed - 2025.</p>
</footer>
</body>
</html>
19 changes: 16 additions & 3 deletions Wireframe/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ a {
padding: var(--space);
border: var(--line);
max-width: fit-content;
display: inline-block;
margin-top: 10px;
text-decoration: none;
color: black;
}
img,
svg {
Expand All @@ -45,6 +49,15 @@ svg {
Setting the overall rules for page regions
https://www.w3.org/WAI/tutorials/page-structure/regions/
*/
header {
text-align: center;
padding: var(--space);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}

main {
max-width: var(--container);
margin: 0 auto calc(var(--space) * 4) auto;
Expand All @@ -65,9 +78,9 @@ main {
display: grid;
grid-template-columns: 1fr 1fr;
gap: var(--space);
> *:first-child {
grid-column: span 2;
}
}
main > article:first-child {
grid-column: span 2;
}
/* ====== Article Layout ======
Setting the rules for how elements are placed in the article.
Expand Down