-
-
Notifications
You must be signed in to change notification settings - Fork 501
Glasgow | May-2026 | Craig Stoddart | Sprint 1 | Form Controls #1413
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
8e42931
4ea3905
37ba83c
ae6e173
a4dbbe1
770726e
33d6910
53f0989
0728ba1
8576e9d
15bf3af
a851094
efae5ad
c2864c8
fbeac8a
01455f7
537aeb3
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,114 @@ | ||
| <!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="viewport" content="width=device-width, initial-scale=1" /> | ||
|
|
||
| <link rel="stylesheet" href="mystyle.css" /> | ||
| </head> | ||
| <body> | ||
| <header> | ||
| <h1>Product Pick</h1> | ||
| <h1>T-Shirt Order</h1> | ||
| </header> | ||
| <main> | ||
| <h2>Verify your order and details below:</h2> | ||
| <form> | ||
| <!-- write your html here--> | ||
| <!-- | ||
| try writing out the requirements first as comments | ||
| this will also help you fill in your PR message later--> | ||
| <!-- REQUIREMENTS: | ||
| Each requirement is listed as a comment with the corresponding code below it--> | ||
|
|
||
| <div class="container"> | ||
| <!-- 1.Customer's name - ensure it contains at least two non-space characters. --> | ||
| <div> | ||
| <p> | ||
| <label | ||
| >Full Name: | ||
| <input | ||
| type="text" | ||
| id="name" | ||
| name="name" | ||
| pattern=".*\S.*\S.*" | ||
| title="Please enter at least two letters or characters (spaces do not count)." | ||
| required | ||
| /> | ||
| </label> | ||
| </p> | ||
| </div> | ||
|
|
||
| <!-- 2.Customer's email - Email must be valid and follow consistent pattern. --> | ||
| <div> | ||
| <p> | ||
| <label | ||
| >Email: | ||
| <input type="email" id="mail" name="User Email" required /> | ||
| </label> | ||
| </p> | ||
| </div> | ||
|
|
||
| <!-- 3.T-Shirt colours - Provide 3 options, ensure right option can be picked. --> | ||
| <div> | ||
| <p> | ||
| <label for="t-shirt-colour"> T-Shirt Colour: </label> | ||
| <select name="t-shirt-colour" id="t-shirt-colour" required> | ||
| <option value="" selected>Select a colour</option> | ||
|
|
||
| <option label="Red" value="Red">Red</option> | ||
| <option label="Blue" value="Blue">Blue</option> | ||
| <option label="Yellow" value="Yellow">Yellow</option> | ||
| </select> | ||
| </p> | ||
| </div> | ||
|
|
||
| <!-- 4.Provide size options -XS, S, M, L, XL, XXL --> | ||
| <div> | ||
| <p>T-Shirt Size:</p> | ||
|
|
||
| <p> | ||
| <label | ||
| >XS: | ||
| <input type="radio" name="Size" value="XS" required /> | ||
| </label> | ||
|
|
||
| <label | ||
| >S: | ||
| <input type="radio" name="Size" value="S" required /> | ||
|
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. The convention is to use lowercase kebab-case values for the name attribute (and also for
Author
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. Noted, I'll change this. |
||
| </label> | ||
|
|
||
| <label | ||
| >M: | ||
| <input type="radio" name="Size" value="M" required /> | ||
| </label> | ||
|
|
||
| <label | ||
| >L: | ||
| <input type="radio" name="Size" value="L" required /> | ||
| </label> | ||
|
|
||
| <label | ||
| >XL: | ||
| <input type="radio" name="Size" value="XL" required /> | ||
| </label> | ||
|
|
||
| <label | ||
| >XXL: | ||
| <input type="radio" name="Size" value="XXL" required /> | ||
| </label> | ||
| </p> | ||
| </div> | ||
| </div> | ||
|
|
||
| <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. Consider using CSS to control spacing between elements instead of using
Author
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. Ok. |
||
|
|
||
| <div> | ||
| <button type="submit">Submit</button> | ||
| </div> | ||
| </form> | ||
| </main> | ||
| <footer> | ||
| <!-- change to your name--> | ||
| <p>By HOMEWORK SOLUTION</p> | ||
| <p>By Craig Stoddart</p> | ||
| </footer> | ||
| </body> | ||
| </html> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| /* Form Styling */ | ||
| /* Text Formatting */ | ||
| /* Headers */ | ||
| h1, h2 {font-family: Tahoma;} | ||
|
|
||
| h2 {font-weight: lighter;} | ||
|
|
||
| /* Paragraph */ | ||
|
|
||
| p {font-family: verdana; | ||
| font-size: 90%;} | ||
|
|
||
| .container {border-style: solid; | ||
| border-width: 1px; | ||
| padding: 5px; | ||
| max-width:350px;} |
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.
Could you look up "Should the text associated with a radio button be placed on left or right of the radio button?"
Change is optional.
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.
Sure, I'll look into it.