-
-
Notifications
You must be signed in to change notification settings - Fork 491
Manchester | 26-ITP-May | John Robinson | Sprint 1 | Form Controls #1301
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
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 |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| body { | ||
| font-family: Arial, sans-serif; | ||
| padding: 20px; | ||
| background-color: Pink; | ||
| } | ||
| h2 { | ||
| text-align: center; | ||
| } | ||
|
|
||
| .form-group { | ||
| width: 60%; | ||
| background: white; | ||
| text-align: left; | ||
| display: block; | ||
| margin: 0 auto; | ||
| padding: 10px; | ||
| border-radius: 8px; | ||
| box-shadow: 0 4px 6px rgba(0,0,0,0.1); | ||
| } | ||
|
|
||
| label { | ||
| display: block; | ||
| margin-bottom: 5px; | ||
| font-weight: 600; | ||
| } | ||
|
|
||
| input[type="text"], | ||
| input[type="email"], | ||
| select { | ||
| width: 100%; | ||
| padding: 8px; | ||
| border: 1px solid #ccc; | ||
| border-radius: 4px; | ||
| box-sizing: border-box; /* Crucial for width alignment */ | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <link href="index.css" rel="stylesheet"> | ||
| <meta charset="utf-8" /> | ||
| <meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
| <title>My form exercise</title> | ||
|
|
@@ -13,15 +14,48 @@ <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> | ||
| <form class="order-form"> | ||
| <h2>T Shirt Order Form</h2> | ||
|
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 formatting standard for HTML elements is to use indentation on children elements. This makes it easier to understand the structure. How can you ensure consistent formatting in your code automatically? |
||
|
|
||
| <!-- Name Field --> | ||
| <div class="form-group"> | ||
| <label for="name">Full Name</label> | ||
| <input type="text" id="name" name="name" placeholder="John Robinson" required> | ||
|
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. How can you ensure that the input requires 2 characters? |
||
| </div> | ||
|
|
||
| <!-- Email Field --> | ||
| <div class="form-group"> | ||
| <label for="email">Email Address</label> | ||
| <input type="email" id="email" name="email" placeholder="john@example.com" required> | ||
| </div> | ||
|
|
||
| <!-- Shirt Colour 3 colours only--> | ||
| <div class="form-group"> | ||
| <label for="colour">T Shirt Colour</label> | ||
| <select id="Colour" name="Colour"> | ||
| <option value="Red">Red</option> | ||
| <option value="White">White</option> | ||
| <option value="Black">Black</option> | ||
| </select> | ||
| </div> | ||
|
|
||
| <!-- Shirt size xs - xxl --> | ||
| <div class="form-group"> | ||
| <label for="Size">T Shirt Size</label> | ||
| <select id="Size" name="Size"> | ||
| <option value="XS">XSmall</option> | ||
| <option value="S">Small</option> | ||
| <option value="M">Medium</option> | ||
| <option value="L">Large</option> | ||
| <option value="XL">XLarge</option> | ||
| <option value="XXL">XXLarge</option> | ||
| </select> | ||
| </div> | ||
| </form> | ||
| </main> | ||
| <footer> | ||
| <!-- change to your name--> | ||
| <p>By HOMEWORK SOLUTION</p> | ||
| <p>By John Robinson</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.
I see 2 errors when I paste the code in the w3 validator: https://validator.w3.org/nu/#textarea
How can you fix them?