-
-
Notifications
You must be signed in to change notification settings - Fork 501
London | 26-ITP-MAY | Chinwe Chukwuma | Sprint 1 | Form Controls #1392
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
bb6c17b
ccca42c
ba18980
7758364
587c1c7
164f988
f3719bf
319d0ea
75f16f1
a237a1b
fa58d77
418efc8
20e1211
9af1f1e
6453378
a5ba9e3
f45878f
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,27 +1,119 @@ | ||
| <!DOCTYPE html> | ||
| <!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="description" content="Form for ordering T-Shirts" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
|
|
||
| <style> | ||
| form div { | ||
| margin-bottom: 10px; | ||
| } | ||
| #name, | ||
| #email, | ||
| #colour { | ||
| padding: 10px; | ||
| font-size: 1rem; | ||
| border: 1px solid black; | ||
| border-radius: 5px; | ||
| } | ||
|
|
||
| input[type="text"], | ||
| input[type="email"], | ||
| select { | ||
| width: 100%; | ||
| max-width: 400px; | ||
| padding: 20px; | ||
| box-sizing: border-box; | ||
| } | ||
|
|
||
| button { | ||
| background-color: blue; | ||
| color: white; | ||
| padding: 10px 20px; | ||
| border: none; | ||
| border-radius: 8px; | ||
| font-size: 1.5rem; | ||
| cursor: pointer; | ||
| } | ||
| </style> | ||
| </head> | ||
| <body> | ||
| <header> | ||
| <h1>Product Pick</h1> | ||
| <h1>Product Pick - T-Shirt Order Form</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">Full Name</label> | ||
| <input | ||
| id="name" | ||
| name="name" | ||
| type="text" | ||
| required | ||
| pattern=".*\S.*\S.*" | ||
|
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. Well done on the validation |
||
| /> | ||
| </div> | ||
|
|
||
| <div> | ||
| <label for="email">Email Address</label> | ||
| <input id="email" name="email" type="email" required /> | ||
| </div> | ||
|
|
||
| <fieldset> | ||
| <legend>Choose your Colour</legend> | ||
|
|
||
| <label for="colour" class="visually-hidden">Colour Choice</label> | ||
| <select id="colour" name="colour" required> | ||
| <option value="">Select Your Colour</option> | ||
| <option value="Burgundy">Burgundy</option> | ||
| <option value="Purple">Purple</option> | ||
| <option value="Yellow">Yellow</option> | ||
| </select> | ||
|
Comment on lines
+70
to
+75
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. FYI: I would switch around the form types. Radio buttons are good if there are not to many options to choose from. Space on a web page is precious and for inputs with a lot of options a dropdown can save a lot of space. (You don't need to change anything. This is just an information on the different input types) |
||
| </fieldset> | ||
|
|
||
| <fieldset> | ||
| <legend>Size Choice</legend> | ||
| <div> | ||
| <label> | ||
| <input type="radio" name="size" value="XS" required /> | ||
| XS | ||
| </label> | ||
|
|
||
| <label> | ||
| <input type="radio" name="size" value="S" /> | ||
| S | ||
| </label> | ||
|
|
||
| <label> | ||
| <input type="radio" name="size" value="M" /> | ||
| M | ||
| </label> | ||
| <label> | ||
| <input type="radio" name="size" value="L" /> | ||
| L | ||
| </label> | ||
| <label> | ||
| <input type="radio" name="size" value="XL" /> | ||
| XL | ||
| </label> | ||
| <label> | ||
| <input type="radio" name="size" value="XXL" /> | ||
| XXL | ||
| </label> | ||
| </div> | ||
| </fieldset> | ||
|
|
||
|
|
||
| <button type="submit">Place Your Order</button> | ||
| </form> | ||
| </main> | ||
| <footer> | ||
| <!-- change to your name--> | ||
| <p>By HOMEWORK SOLUTION</p> | ||
|
|
||
| <p>By CHINWE CHUKWUMA</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.
How could you separate the code for the styling from the HTML to make it easier to review (because of smaller files with separate responsibilities)