-
-
Notifications
You must be signed in to change notification settings - Fork 542
Manchester | 26-ITP-Sep | Ahmed Elmahmoudi | Sprint 1 | Form controls #1506
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
base: main
Are you sure you want to change the base?
Changes from all commits
37961e3
e040675
2209ca4
98a1815
91005b6
61dcc8b
049784b
5c1bcb2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| <!DOCTYPE html> | ||
| <!doctype html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="utf-8" /> | ||
|
|
@@ -12,16 +12,62 @@ | |
| <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 class="form"> | ||
| <label for="name">Name:</label> | ||
| <input type="text" name="name" id="name" minlength="2" required /> | ||
|
|
||
| <br /><br /> | ||
|
|
||
| <label for="email"> Email:</label> | ||
| <input type="email" name="email" id="email" required /> | ||
|
|
||
| <br /><br /> | ||
|
|
||
| <label for="colour"> Colour: </label> | ||
| <select name="colour" id="colour" required> | ||
| <option value="select" selected disabled>Select</option> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's a nice user experience to have a placeholder Have a look at the MDN documentation for |
||
| <option value="red">Red</option> | ||
| <option value="green">Green</option> | ||
| <option value="red">Red</option> | ||
| </select> | ||
|
|
||
| <br /><br /> | ||
|
|
||
| <fieldset> | ||
| <legend>Size</legend> | ||
|
|
||
| <label for="XS">XS</label> | ||
| <input type="radio" name="size" id="XS" value="XS" required /> | ||
| <br /><br /> | ||
|
|
||
| <label for="S">S</label> | ||
| <input type="radio" name="size" id="S" value="S" /> | ||
| <br /><br /> | ||
|
|
||
| <label for="M">M</label> | ||
| <input type="radio" name="size" id="M" value="M" /> | ||
| <br /><br /> | ||
|
|
||
| <label for="L">L</label> | ||
| <input type="radio" name="size" id="L" value="L" /> | ||
| <br /><br /> | ||
|
|
||
| <label for="XL">XL</label> | ||
| <input type="radio" name="size" id="XL" value="XL" /> | ||
| <br /><br /> | ||
|
|
||
| <label for="XXL">XXL</label> | ||
| <input type="radio" name="size" id="XXL" value="XXL" /> | ||
| <br /><br /> | ||
| </fieldset> | ||
|
|
||
| <br /><br /> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can see you've used
If you are adding spacing between elements on a page, that's exactly what CSS is for. Shortcuts like this can seem useful but they run the risk of causing unexpected confusion for assistive technologies when used out of place! Note: styling is not required for this task. I'm not going to require you to change anything on this point, but bear in mind for future that you should avoid using |
||
|
|
||
| <button type="submit">Submit</button> | ||
| </form> | ||
| </main> | ||
| <footer> | ||
| <!-- change to your name--> | ||
| <p>By HOMEWORK SOLUTION</p> | ||
| <p>Ahmed Elmahmoudi</p> | ||
| </footer> | ||
| </body> | ||
| </html> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minlengthis a useful attribute, but it doesn't do exactly what is being asked by the instructions for this task. Have a read of the instructions again for what the requirement is for validating the name input (and read the tip that helps you figure out how to attack it!)