-
-
Notifications
You must be signed in to change notification settings - Fork 405
London | 26-ITP-Jan | Damian Dunkley | Sprint 2 | Form-Controls #1027
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
a0943dd
3e10354
73b1697
43967f2
f7fb669
173fecb
31bebe9
cf2b1ba
97c68bc
8d5c720
ec9f9c4
484e648
d0bb4ed
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 |
|---|---|---|
|
|
@@ -14,14 +14,66 @@ <h1>Product Pick</h1> | |
| <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--> | ||
| <!-- requirements, | ||
| customer name, must have at least two characters | ||
| Customers email must have format text@text.text | ||
| Colour choice, must be one of red, blue or green | ||
| Size choice must be Xs, S, M, L, XL, XXL | ||
| --> | ||
|
|
||
| <style> | ||
| label { | ||
| font-size: 24px; | ||
| } | ||
| </style> | ||
|
|
||
| <div> | ||
| <!-- Name: at least 2 characters --> | ||
| <label for="name">Name:</label> | ||
| <input type="text" id="name" name="name" required pattern=".{2,}" title="Name must be at least 2 characters long"> | ||
|
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. Currently a user can enter a name consisting of only space characters (e.g., " "). Can you enforce a stricter Note: To enforce minimum number of characters in the input, it is better to use the |
||
| </div> | ||
| <div> | ||
| <!-- Email: basic format text@text.text --> | ||
| <label for="email">Email:</label> | ||
| <input type="email" id="email" name="email" required pattern="^[^@\s]+@[^@\s]+\.[^@\s]+$" title="Enter a valid email like user@example.com"> | ||
|
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. Why use pattern in |
||
| </div> | ||
| <div> | ||
| <!-- Colour choice: red, blue, green --> | ||
| <label for="colour">Colour:</label> | ||
| <select id="colour" name="colour" required> | ||
| <option value="">Select a colour</option> | ||
| <option value="red">Red</option> | ||
| <option value="blue">Blue</option> | ||
| <option value="green">Green</option> | ||
| </select> | ||
| </div> | ||
| <div> | ||
| <!-- Size choice: XS, S, M, L, XL, XXL --> | ||
| <label for="size">Size:</label> | ||
| <select id="size" name="size" required> | ||
| <option value="">Select a size</option> | ||
| <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> | ||
| </div> | ||
|
|
||
|
Comment on lines
+60
to
+63
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 indentation of some of the code is off. Can you improve the indentation? VSCode's "Format Document" feature can help us format our code for better readability and consistency. |
||
|
|
||
| <button type="submit">Submit</button> | ||
| </form> | ||
| </main> | ||
| <footer> | ||
| <!-- change to your name--> | ||
| <h2>By HOMEWORK SOLUTION</h2> | ||
| <h2> | ||
| <style> | ||
| h2 { | ||
| font-size: 10px; | ||
|
|
||
| </style> | ||
| By Damian Dunkley for Code your Future ITP Jan 2026 Sprint 2</h2> | ||
| </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.
Normal practice is to keep embedded CSS in the
<head>section.