-
Notifications
You must be signed in to change notification settings - Fork 608
Develop #795
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?
Develop #795
Changes from 7 commits
80845d9
f9d7dcc
2ab53c4
824f62c
2687a6b
f1ece48
19ec1cd
236588a
91ab245
b596522
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,3 +1,49 @@ | ||
| { | ||
| "extends": "@mate-academy/linthtml-config" | ||
| "attr-bans": [ | ||
| "align", | ||
| "background", | ||
| "bgcolor", | ||
| "border", | ||
| "frameborder", | ||
| "style" | ||
| ], | ||
| "attr-name-ignore-regex": "viewBox", | ||
| "attr-no-dup": true, | ||
| "attr-quote-style": "double", | ||
| "attr-req-value": true, | ||
| "class-no-dup": true, | ||
| "doctype-first": true, | ||
| "doctype-html5": true, | ||
| "fig-req-figcaption": true, | ||
| "head-req-title": true, | ||
| "html-req-lang": true, | ||
| "id-class-style": false, | ||
| "id-no-dup": true, | ||
| "img-req-src": true, | ||
| "img-req-alt": "allownull", | ||
| "indent-width": 2, | ||
| "indent-style": "spaces", | ||
| "indent-width-cont": true, | ||
| "input-radio-req-name": true, | ||
| "spec-char-escape": true, | ||
| "tag-bans": [ | ||
| "b", | ||
| "i", | ||
| "u", | ||
| "center", | ||
| "style", | ||
| "marquee", | ||
| "font", | ||
| "s" | ||
| ], | ||
| "tag-name-lowercase": true, | ||
| "tag-name-match": true, | ||
| "tag-self-close": "never", | ||
| "tag-close": true, | ||
| "text-ignore-regex": "&", | ||
| "title-no-dup": true, | ||
| "line-end-style": "lf", | ||
| "attr-new-line": 2, | ||
| "attr-name-style": "dash", | ||
| "attr-no-unsafe-char": true | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -11,7 +11,214 @@ | |||||||||||||||||||||
| <link rel="stylesheet" href="./style.css"> | ||||||||||||||||||||||
| </head> | ||||||||||||||||||||||
| <body> | ||||||||||||||||||||||
| <h1>HTML Form</h1> | ||||||||||||||||||||||
| <form action="https://mate-academy-form-lesson.herokuapp.com/create-application" class="form"> | ||||||||||||||||||||||
| <fieldset> | ||||||||||||||||||||||
| <legend>Personal information</legend> | ||||||||||||||||||||||
| <div> | ||||||||||||||||||||||
| <label for="surname">Surnmae: </label> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| <input | ||||||||||||||||||||||
| type="text" | ||||||||||||||||||||||
| name="surname" | ||||||||||||||||||||||
| id="surname" | ||||||||||||||||||||||
| autocomplete="off" | ||||||||||||||||||||||
| > | ||||||||||||||||||||||
| </div> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| <div class="form-field"> | ||||||||||||||||||||||
| <label for="name">Name: </label> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| <input | ||||||||||||||||||||||
| type="text" | ||||||||||||||||||||||
| name="name" | ||||||||||||||||||||||
| id="name" | ||||||||||||||||||||||
| autocomplete="off" | ||||||||||||||||||||||
| > | ||||||||||||||||||||||
| </div> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| <div class="form-field"> | ||||||||||||||||||||||
| <label for="age">How old are You?</label> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| <input | ||||||||||||||||||||||
| type="number" | ||||||||||||||||||||||
| name="age" | ||||||||||||||||||||||
| id="age" | ||||||||||||||||||||||
| autocomplete="off" | ||||||||||||||||||||||
| value="12" | ||||||||||||||||||||||
| min="1" | ||||||||||||||||||||||
| max="100" | ||||||||||||||||||||||
| required | ||||||||||||||||||||||
| > | ||||||||||||||||||||||
| </div> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| <div class="form-field"> | ||||||||||||||||||||||
| <label for="date-birth">Full date of birth: </label> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| <input | ||||||||||||||||||||||
| type="date" | ||||||||||||||||||||||
| name="date-birth" | ||||||||||||||||||||||
|
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. Name attibute should be camelCase
Suggested change
|
||||||||||||||||||||||
| id="date-birth" | ||||||||||||||||||||||
| autocomplete="off" | ||||||||||||||||||||||
| > | ||||||||||||||||||||||
| </div> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| <div class="form-field"> | ||||||||||||||||||||||
| <label for="agreement">I accept the term of the agreement </label> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| <input | ||||||||||||||||||||||
| type="checkbox" | ||||||||||||||||||||||
| name="agreement" | ||||||||||||||||||||||
| id="agreement" | ||||||||||||||||||||||
| autocomplete="off" | ||||||||||||||||||||||
| required | ||||||||||||||||||||||
| > | ||||||||||||||||||||||
| </div> | ||||||||||||||||||||||
| </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. Only one line space between siblings is needed |
||||||||||||||||||||||
| <fieldset class="fieldset"> | ||||||||||||||||||||||
| <legend>Registration</legend> | ||||||||||||||||||||||
| <div> | ||||||||||||||||||||||
|
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 empty line - double check if there are empty lines between siblings elements, do not add empty lines between parent and child |
||||||||||||||||||||||
| <label for="email">E-mail: </label> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| <input | ||||||||||||||||||||||
| type="email" | ||||||||||||||||||||||
| name="email" | ||||||||||||||||||||||
| id="email" | ||||||||||||||||||||||
| autocomplete="off" | ||||||||||||||||||||||
| placeholder="email@example.com" | ||||||||||||||||||||||
| required | ||||||||||||||||||||||
| > | ||||||||||||||||||||||
| </div> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| <div class="form-field"> | ||||||||||||||||||||||
| <label for="password">Password: </label> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| <input | ||||||||||||||||||||||
| type="password" | ||||||||||||||||||||||
| name="password" | ||||||||||||||||||||||
| id="password" | ||||||||||||||||||||||
| autocomplete="off" | ||||||||||||||||||||||
| required | ||||||||||||||||||||||
| minlength="5" | ||||||||||||||||||||||
| maxlength="10" | ||||||||||||||||||||||
| > | ||||||||||||||||||||||
| </div> | ||||||||||||||||||||||
| </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. Same here |
||||||||||||||||||||||
| <fieldset class="fieldset"> | ||||||||||||||||||||||
| <legend>An interesting fact about you!</legend> | ||||||||||||||||||||||
| <div> | ||||||||||||||||||||||
|
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 empty line between siblings |
||||||||||||||||||||||
| <label for="yes">Do you love cats?</label> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| <input | ||||||||||||||||||||||
| type="radio" | ||||||||||||||||||||||
| name="choice" | ||||||||||||||||||||||
|
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. Lets make this name more descriptive so it is easier to use (in scenartio when form is being send)
Suggested change
|
||||||||||||||||||||||
| id="yes" | ||||||||||||||||||||||
| autocomplete="off" | ||||||||||||||||||||||
| value="Yes" | ||||||||||||||||||||||
| > | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| <label for="yes">Yes</label> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| <input type="radio" | ||||||||||||||||||||||
| name="choice" | ||||||||||||||||||||||
|
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. Same here
Suggested change
|
||||||||||||||||||||||
| id="no" | ||||||||||||||||||||||
| autocomplete="off" | ||||||||||||||||||||||
| value="No" | ||||||||||||||||||||||
| > | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| <label for="no">No</label> | ||||||||||||||||||||||
| </div> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| <div class="form-field"> | ||||||||||||||||||||||
| <label for="colour">What is your favorite color?</label> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| <input | ||||||||||||||||||||||
| type="color" | ||||||||||||||||||||||
| name="colour" | ||||||||||||||||||||||
|
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. fix typo 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. Should be
Suggested change
|
||||||||||||||||||||||
| id="colour" | ||||||||||||||||||||||
| autocomplete="off" | ||||||||||||||||||||||
| > | ||||||||||||||||||||||
| </div> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| <div class="form-field"> | ||||||||||||||||||||||
| <label for="time">What time do you go to bed?</label> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| <input | ||||||||||||||||||||||
| type="time" | ||||||||||||||||||||||
| name="time" | ||||||||||||||||||||||
| id="time" | ||||||||||||||||||||||
| autocomplete="off" | ||||||||||||||||||||||
| > | ||||||||||||||||||||||
| </div> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| <div class="form-field"> | ||||||||||||||||||||||
| <label for="cars">What are your favorite brand of cars?</label> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| <select | ||||||||||||||||||||||
| name="cars" | ||||||||||||||||||||||
| id="cars" | ||||||||||||||||||||||
| autocomplete="off" | ||||||||||||||||||||||
| multiple | ||||||||||||||||||||||
| > | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
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. Remove line between parent and child tag 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. Remove space |
||||||||||||||||||||||
| <option value="BMW">BMW</option> | ||||||||||||||||||||||
| <option value="Audi">Audi</option> | ||||||||||||||||||||||
| <option value="Lada">Lada</option> | ||||||||||||||||||||||
| </select> | ||||||||||||||||||||||
| </div> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| <div class="form-field"> | ||||||||||||||||||||||
| <label for="rating">How do you rate our work?</label> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| <input | ||||||||||||||||||||||
| type="range" | ||||||||||||||||||||||
| name="rating" | ||||||||||||||||||||||
| id="rating" | ||||||||||||||||||||||
| value="0" | ||||||||||||||||||||||
| autocomplete="off" | ||||||||||||||||||||||
| > | ||||||||||||||||||||||
| </div> | ||||||||||||||||||||||
| </fieldset> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| <fieldset class="fieldset"> | ||||||||||||||||||||||
| <legend>Additional info:</legend> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| <div> | ||||||||||||||||||||||
| <label for="comment">Comments: </label> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| <textarea | ||||||||||||||||||||||
| name="comment" | ||||||||||||||||||||||
| id="comment" | ||||||||||||||||||||||
| cols="20" | ||||||||||||||||||||||
| rows="2" | ||||||||||||||||||||||
| autocomplete="off"> | ||||||||||||||||||||||
| </textarea> | ||||||||||||||||||||||
|
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. |
||||||||||||||||||||||
| </div> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| <div class="form-field"> | ||||||||||||||||||||||
| <label for="recommend">Would you recommend us?</label> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| <select | ||||||||||||||||||||||
| name="recommend" | ||||||||||||||||||||||
| id="recommend" | ||||||||||||||||||||||
| 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. Fix formatting
Suggested change
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. remove space |
||||||||||||||||||||||
| <option value="Yes">yes</option> | ||||||||||||||||||||||
| <option value="no">no</option> | ||||||||||||||||||||||
| </select> | ||||||||||||||||||||||
| </div> | ||||||||||||||||||||||
| </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. Remove one space |
||||||||||||||||||||||
| <button type="submit"class="button">Submit</button> | ||||||||||||||||||||||
| </form> | ||||||||||||||||||||||
| <script type="text/javascript" src="./main.js"></script> | ||||||||||||||||||||||
| </body> | ||||||||||||||||||||||
| </html> | ||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,12 @@ | ||
| /* styles go here */ | ||
|
|
||
| .form-field { | ||
| margin: 10px 0 0; | ||
| } | ||
|
|
||
| .fieldset { | ||
| margin-top: 20px; | ||
| } | ||
|
|
||
| .button { | ||
| margin-top: 20px; | ||
| } |

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.
Be consistant and add class to all form fields wrappers. You can then specify the margins using pseudo selectors in css
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.
All tips done I hope now its good.