-
Notifications
You must be signed in to change notification settings - Fork 608
added task solution #790
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: master
Are you sure you want to change the base?
added task solution #790
Changes from 1 commit
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,7 +1,7 @@ | ||
| # HTML form | ||
| Replace `<your_account>` with your Github username and copy the links to Pull Request description: | ||
| - [DEMO LINK](https://<your_account>.github.io/layout_html-form/) | ||
| - [TEST REPORT LINK](https://<your_account>.github.io/layout_html-form/report/html_report/) | ||
| - [DEMO LINK](https://LabPetro.github.io/layout_html-form/) | ||
| - [TEST REPORT LINK](https://LabPetro.github.io/layout_html-form/report/html_report/) | ||
|
|
||
| > Follow [this instructions](https://mate-academy.github.io/layout_task-guideline/#how-to-solve-the-layout-tasks-on-github) | ||
| ___ | ||
|
|
@@ -40,7 +40,7 @@ Create HTML page with form. On form submit send form data to `https://mate-acade | |
| - Age should be at least `1` and at max `100` with a default value of `12` | ||
| - The email field should have placeholder value: `[email protected]`. | ||
| - Text fields should have `autocomplete="off"`. | ||
| - `Submit` button should have a `type="submit"` | ||
| - `Submit` button should have a `type="submit"` | ||
| - Vertical distance between inputs should be `10px` | ||
| - Vertical distance between groups should be `20px` | ||
| - Any other styles should be browser default | ||
|
|
@@ -62,3 +62,4 @@ Create HTML page with form. On form submit send form data to `https://mate-acade | |
| ></textarea> | ||
| ``` | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -11,7 +11,185 @@ | |||||||||||||||||||||||||
| <link rel="stylesheet" href="./style.css"> | ||||||||||||||||||||||||||
| </head> | ||||||||||||||||||||||||||
| <body> | ||||||||||||||||||||||||||
| <h1>HTML Form</h1> | ||||||||||||||||||||||||||
| <script type="text/javascript" src="./main.js"></script> | ||||||||||||||||||||||||||
| <form | ||||||||||||||||||||||||||
| action="https://mate-academy-form-lesson.herokuapp.com/create-application" | ||||||||||||||||||||||||||
| method="post"> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| <fieldset> | ||||||||||||||||||||||||||
| <legend>Personal information</legend> | ||||||||||||||||||||||||||
| <label for="surname">Surname:</label> | ||||||||||||||||||||||||||
| <input | ||||||||||||||||||||||||||
| class="duo" | ||||||||||||||||||||||||||
| type="text" | ||||||||||||||||||||||||||
| id="surname" | ||||||||||||||||||||||||||
| name="info" | ||||||||||||||||||||||||||
|
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 name attribute should be more descriptive, e.g. 'surname' instead of 'info'. |
||||||||||||||||||||||||||
| autocomplete="off" | ||||||||||||||||||||||||||
|
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. Check the code style everywhere
Suggested change
|
||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||
| <br> | ||||||||||||||||||||||||||
| <label for="name">Name:</label> | ||||||||||||||||||||||||||
| <input | ||||||||||||||||||||||||||
| class="duo" | ||||||||||||||||||||||||||
| type="text" | ||||||||||||||||||||||||||
| id="name" | ||||||||||||||||||||||||||
| name="information" | ||||||||||||||||||||||||||
|
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 name attribute should be more descriptive, e.g. 'name' instead of 'information'. |
||||||||||||||||||||||||||
| autocomplete="off" | ||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||
| <br> | ||||||||||||||||||||||||||
| <label for="age">How old are You?</label> | ||||||||||||||||||||||||||
| <input | ||||||||||||||||||||||||||
| class="duo" | ||||||||||||||||||||||||||
| type="number" | ||||||||||||||||||||||||||
| id="age" | ||||||||||||||||||||||||||
| name="age" | ||||||||||||||||||||||||||
| value="12" | ||||||||||||||||||||||||||
| min="1" | ||||||||||||||||||||||||||
| max="100" | ||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||
| <br> | ||||||||||||||||||||||||||
| <label for="date">Full date of birth:</label> | ||||||||||||||||||||||||||
| <input | ||||||||||||||||||||||||||
| class="duo" | ||||||||||||||||||||||||||
| type="date" | ||||||||||||||||||||||||||
| id="date" | ||||||||||||||||||||||||||
| name="date" | ||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||
| <br> | ||||||||||||||||||||||||||
| <label for="box">I accept the term of the agreement</label> | ||||||||||||||||||||||||||
| <input | ||||||||||||||||||||||||||
| type="checkbox" | ||||||||||||||||||||||||||
| id="box" | ||||||||||||||||||||||||||
| name="box" | ||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||
| <br> | ||||||||||||||||||||||||||
| </fieldset> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| <fieldset> | ||||||||||||||||||||||||||
| <legend>Registration</legend> | ||||||||||||||||||||||||||
| <label for="adress">E-mail:</label> | ||||||||||||||||||||||||||
| <input | ||||||||||||||||||||||||||
| type="email" | ||||||||||||||||||||||||||
| id="adress" | ||||||||||||||||||||||||||
| class="duo" | ||||||||||||||||||||||||||
| name="adress" | ||||||||||||||||||||||||||
| placeholder="[email protected]" | ||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||
| <br> | ||||||||||||||||||||||||||
| <label for="secret">Password:</label> | ||||||||||||||||||||||||||
| <input | ||||||||||||||||||||||||||
| type="password" | ||||||||||||||||||||||||||
| id="secret" | ||||||||||||||||||||||||||
| name="secret" | ||||||||||||||||||||||||||
| required | ||||||||||||||||||||||||||
| autocomplete="off" | ||||||||||||||||||||||||||
| minlength="8" | ||||||||||||||||||||||||||
| maxlength="15" | ||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||
| </fieldset> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| <fieldset> | ||||||||||||||||||||||||||
| <legend>An interesting fact about you!</legend> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| <div class="duo"> | ||||||||||||||||||||||||||
| <label for="cat">Do you love cats?</label> | ||||||||||||||||||||||||||
| <input | ||||||||||||||||||||||||||
|
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. Add a label to each radio button. It doesn't work correctly now Screen.Recording.2023-05-17.at.13.49.21.mov |
||||||||||||||||||||||||||
| id="cat" | ||||||||||||||||||||||||||
| type="radio" | ||||||||||||||||||||||||||
| name="pet" | ||||||||||||||||||||||||||
| value="yes" | ||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||
| Yes | ||||||||||||||||||||||||||
| <input | ||||||||||||||||||||||||||
| type="radio" | ||||||||||||||||||||||||||
| name="pet" | ||||||||||||||||||||||||||
| value="No" | ||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||
| No | ||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||
| <div class="duo"> | ||||||||||||||||||||||||||
| <label for="color">What is your favorite color?</label> | ||||||||||||||||||||||||||
| <input | ||||||||||||||||||||||||||
| type="color" | ||||||||||||||||||||||||||
| id="color" | ||||||||||||||||||||||||||
| name="color" | ||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| <div class="duo"> | ||||||||||||||||||||||||||
| <label for="time">What time do you go to bed?</label> | ||||||||||||||||||||||||||
| <input | ||||||||||||||||||||||||||
| type="time" | ||||||||||||||||||||||||||
| id="time" | ||||||||||||||||||||||||||
| name="time" | ||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| <div class="duo"> | ||||||||||||||||||||||||||
| <label for="brand">What are your favorite brand of cars?</label> | ||||||||||||||||||||||||||
| <select | ||||||||||||||||||||||||||
| name="car" | ||||||||||||||||||||||||||
| id="brand" | ||||||||||||||||||||||||||
| required | ||||||||||||||||||||||||||
| multiple | ||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||
| <option value="BMW">BMW</option> | ||||||||||||||||||||||||||
| <option value="Audi">Audi</option> | ||||||||||||||||||||||||||
| <option value="Lada">Lada</option> | ||||||||||||||||||||||||||
| </select> | ||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| <div> | ||||||||||||||||||||||||||
| <label for="review">How do you rate our work?</label> | ||||||||||||||||||||||||||
| <input type="range" | ||||||||||||||||||||||||||
| id="review" | ||||||||||||||||||||||||||
| name="rating" | ||||||||||||||||||||||||||
| step="1" | ||||||||||||||||||||||||||
| max="0" | ||||||||||||||||||||||||||
|
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. |
||||||||||||||||||||||||||
| min="0" | ||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| </fieldset> | ||||||||||||||||||||||||||
|
Comment on lines
+150
to
+161
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.
Suggested change
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| <fieldset> | ||||||||||||||||||||||||||
| <legend>Additional info</legend> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| <div class="quads"> | ||||||||||||||||||||||||||
| <label for="comments">Comments:</label> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| <textarea name="write" | ||||||||||||||||||||||||||
| id="comments" | ||||||||||||||||||||||||||
| autocomplete="off" | ||||||||||||||||||||||||||
| required | ||||||||||||||||||||||||||
| ></textarea> | ||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| <label for="approve">Would you recommend us?</label> | ||||||||||||||||||||||||||
| <select | ||||||||||||||||||||||||||
| name="answer" | ||||||||||||||||||||||||||
| id="approve" | ||||||||||||||||||||||||||
| required | ||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||
| <option | ||||||||||||||||||||||||||
| value="Choose" | ||||||||||||||||||||||||||
| disabled | ||||||||||||||||||||||||||
| selected | ||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||
| yes | ||||||||||||||||||||||||||
|
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. |
||||||||||||||||||||||||||
| </option> | ||||||||||||||||||||||||||
| <option value="answer">Yes</option> | ||||||||||||||||||||||||||
| <option value="answer">No</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.
Suggested change
|
||||||||||||||||||||||||||
| </select> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| </fieldset> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| <button | ||||||||||||||||||||||||||
| type="submit" | ||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||
|
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.
Suggested change
|
||||||||||||||||||||||||||
| Submit | ||||||||||||||||||||||||||
| </button> | ||||||||||||||||||||||||||
| </form> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| </body> | ||||||||||||||||||||||||||
| </html> | ||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,12 @@ | ||
| /* styles go here */ | ||
| .duo { | ||
|
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. Use a more descriptive class name instead of 'duo'. For example, 'form-group'. |
||
| margin-bottom: 10px; | ||
| } | ||
|
|
||
| fieldset { | ||
|
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. Use classes for styling |
||
| margin-bottom: 20px; | ||
| } | ||
|
|
||
| .quads { | ||
|
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. Use a more descriptive class name instead of 'quads'. For example, 'form-block'. |
||
| display: block; | ||
| margin-bottom: 10px; | ||
| } | ||


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.