-
-
Notifications
You must be signed in to change notification settings - Fork 500
London | 26-ITP-May | Jorvan White | Sprint 1 | Form-Controls #1265
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
Changes from 10 commits
a11a51e
64a6300
4fea05a
f5922f6
61ea410
2918f50
fc72ea8
b163df1
ea8f171
c285463
a4c76c0
1149e07
7af0c23
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 |
|---|---|---|
|
|
@@ -4,24 +4,42 @@ | |
| <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="T-Shirts form" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
| <link rel="stylesheet" href="style.css" /> | ||
| </head> | ||
| <body> | ||
| <header> | ||
| <h1>Product Pick</h1> | ||
| <h1>T-Shirts</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--> | ||
| <label for="name">Name</label> | ||
| <input id="name" type="text" required/> | ||
| <label for="email">Email</label> | ||
| <input id="email" type="email" required/> | ||
| <label for="size">Size | ||
| <select id="size" required> | ||
| <option value="xsmall">XS</option> | ||
|
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 see 2 errors in the w3 validator https://validator.w3.org/nu/#textarea The first child option element of a select element with a required attribute, and without a multiple attribute, and without a size attribute whose value is greater than 1, must have either an empty value attribute, or must have no text content. Consider either adding a placeholder option label, or adding a size attribute with a value equal to the number of option elements.
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. I have added a "select a size/colour" tag and made it required to not continue without selecting |
||
| <option value="small">S</option> | ||
| <option value="medium">M</option> | ||
| <option value="large">L</option> | ||
| <option value="xlarge">XL</option> | ||
| <option value="xxlarge">XXL</option> | ||
| </select> | ||
| </label> | ||
| <label for="colour">Colour | ||
| <select id="colour" required> | ||
| <option value="yellow">Yellow</option> | ||
| <option value="black">Black</option> | ||
| <option value="pink">Pink</option> | ||
| </select> | ||
| </label> | ||
| <button id="submit">Submit</button> | ||
| </form> | ||
| </main> | ||
| <footer> | ||
| <!-- change to your name--> | ||
| <p>By HOMEWORK SOLUTION</p> | ||
| <p>By Jorvan White</p> | ||
| </footer> | ||
| </body> | ||
| </html> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| body { | ||
| font-family: Helvetica; | ||
| font-size: 30px; | ||
| } | ||
| form { | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: 10px; | ||
| } | ||
| input, select { | ||
| font-size: 25px; | ||
| } | ||
| button { | ||
| font-size: 25px; | ||
| width: 90px; | ||
| } | ||
| #name { | ||
| width: 500px; | ||
| } | ||
| #email { | ||
| width: 500px; | ||
| } | ||
| #submit { | ||
| width: 150px; | ||
| } |
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.
The name should be at least 2 characters
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.
I've added a required pattern to ensure that at least a first and last name is given.
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.
The requirements say "I must collect this data and ensure it contains at least two non-space characters.", so it's does not need a first and last name, but its okay.