-
Notifications
You must be signed in to change notification settings - Fork 608
add task solution #794
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?
add task solution #794
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 | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -11,7 +11,171 @@ | |||||||||||||||||
| <link rel="stylesheet" href="./style.css"> | ||||||||||||||||||
| </head> | ||||||||||||||||||
| <body> | ||||||||||||||||||
| <h1>HTML Form</h1> | ||||||||||||||||||
| <form action="https://mate-academy-form-lesson.herokuapp.com/create-application" method="post"> | ||||||||||||||||||
| <fieldset> | ||||||||||||||||||
| <legend>Personal information</legend> | ||||||||||||||||||
| <div class="form"> | ||||||||||||||||||
|
Luk2asz marked this conversation as resolved.
Outdated
|
||||||||||||||||||
| <label> | ||||||||||||||||||
|
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. Dont wrapp inputs with label.
Suggested change
Add appropriate ids to form elements do the labels is connected
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 corrected my code, please check now |
||||||||||||||||||
| Surname: | ||||||||||||||||||
| <input type="text" | ||||||||||||||||||
| name="surname" 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 formating in this file. Check the checklist for guidelince. It should be formatet like this:
Suggested change
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 corrected my code, please check now |
||||||||||||||||||
| </label> | ||||||||||||||||||
| </div> | ||||||||||||||||||
| <div class="form"> | ||||||||||||||||||
| <label> | ||||||||||||||||||
| Name: | ||||||||||||||||||
| <input type="text" | ||||||||||||||||||
| name="name" autocomplete="off" | ||||||||||||||||||
| > | ||||||||||||||||||
| </label> | ||||||||||||||||||
| </div> | ||||||||||||||||||
| <div class="form"> | ||||||||||||||||||
| <label> | ||||||||||||||||||
| How old are You? | ||||||||||||||||||
| <input type="number" | ||||||||||||||||||
| name="age" | ||||||||||||||||||
| id="age" | ||||||||||||||||||
| value="12" | ||||||||||||||||||
| min="1" | ||||||||||||||||||
| max="100" | ||||||||||||||||||
| > | ||||||||||||||||||
| </label> | ||||||||||||||||||
| </div> | ||||||||||||||||||
| <div class="form"> | ||||||||||||||||||
| <label> | ||||||||||||||||||
| Full date of birth: | ||||||||||||||||||
| <input type="date" | ||||||||||||||||||
| name="date" | ||||||||||||||||||
| id="date" | ||||||||||||||||||
| > | ||||||||||||||||||
| </label> | ||||||||||||||||||
| </div> | ||||||||||||||||||
| <div class="formlsat"> | ||||||||||||||||||
| <label> | ||||||||||||||||||
| I accept the term of the agreement | ||||||||||||||||||
| <input type="checkbox" | ||||||||||||||||||
| name="agree" | ||||||||||||||||||
| id="agree" | ||||||||||||||||||
| required | ||||||||||||||||||
| > | ||||||||||||||||||
| </label> | ||||||||||||||||||
| </div> | ||||||||||||||||||
| </fieldset> | ||||||||||||||||||
| <fieldset> | ||||||||||||||||||
| <legend>Registration</legend> | ||||||||||||||||||
| <div class="form"> | ||||||||||||||||||
| <label> | ||||||||||||||||||
| E-mail: | ||||||||||||||||||
| <input type="email" | ||||||||||||||||||
| name="email" | ||||||||||||||||||
| id="email" | ||||||||||||||||||
| placeholder="email@example.com" | ||||||||||||||||||
| > | ||||||||||||||||||
| </label> | ||||||||||||||||||
| </div> | ||||||||||||||||||
| <div class="formlast"> | ||||||||||||||||||
| <label> | ||||||||||||||||||
| Password: | ||||||||||||||||||
| <input type="password" | ||||||||||||||||||
| name="password" | ||||||||||||||||||
| id="password" | ||||||||||||||||||
| minlength="6" | ||||||||||||||||||
| maxlength="20" | ||||||||||||||||||
| > | ||||||||||||||||||
| </label> | ||||||||||||||||||
| </div> | ||||||||||||||||||
| </fieldset> | ||||||||||||||||||
| <fieldset> | ||||||||||||||||||
| <legend>An interesting fact about you!</legend> | ||||||||||||||||||
| <div class="form"> | ||||||||||||||||||
| Do you love cats? | ||||||||||||||||||
| <label> | ||||||||||||||||||
| <input type="radio" | ||||||||||||||||||
| name="cats" | ||||||||||||||||||
| value="yes" | ||||||||||||||||||
| > | ||||||||||||||||||
| Yes | ||||||||||||||||||
| </label> | ||||||||||||||||||
| <label> | ||||||||||||||||||
| <input type="radio" | ||||||||||||||||||
| name="cats" | ||||||||||||||||||
| value="no" | ||||||||||||||||||
| > | ||||||||||||||||||
| No | ||||||||||||||||||
| </label> | ||||||||||||||||||
| </div> | ||||||||||||||||||
| <div class="form"> | ||||||||||||||||||
| <label> | ||||||||||||||||||
| What is your favorite color? | ||||||||||||||||||
| <input type="color" | ||||||||||||||||||
| name="color" | ||||||||||||||||||
| id="color" | ||||||||||||||||||
| > | ||||||||||||||||||
| </label> | ||||||||||||||||||
| </div> | ||||||||||||||||||
| <div class="form"> | ||||||||||||||||||
| <label> | ||||||||||||||||||
| What time do you go to bed? | ||||||||||||||||||
| <input type="time" | ||||||||||||||||||
| name="time" | ||||||||||||||||||
| id="time" | ||||||||||||||||||
| step="2" | ||||||||||||||||||
| > | ||||||||||||||||||
| </label> | ||||||||||||||||||
| </div> | ||||||||||||||||||
| <div class="form"> | ||||||||||||||||||
| <label> | ||||||||||||||||||
| What are you favorite brand of cars? | ||||||||||||||||||
| <select name="select" | ||||||||||||||||||
| id="select" | ||||||||||||||||||
| multiple | ||||||||||||||||||
| > | ||||||||||||||||||
| <option value="BMW">BMW</option> | ||||||||||||||||||
| <option value="Audi">Audi</option> | ||||||||||||||||||
| <option value="Lada">Lada</option> | ||||||||||||||||||
| </select> | ||||||||||||||||||
| </label> | ||||||||||||||||||
| </div> | ||||||||||||||||||
| <div class="formlast"> | ||||||||||||||||||
| <label> | ||||||||||||||||||
| How do you rate our work? | ||||||||||||||||||
| <input type="range" | ||||||||||||||||||
| name="range" | ||||||||||||||||||
| min="0" | ||||||||||||||||||
| max="10" | ||||||||||||||||||
| value="5" | ||||||||||||||||||
| placeholder="5" | ||||||||||||||||||
| > | ||||||||||||||||||
| </label> | ||||||||||||||||||
| </div> | ||||||||||||||||||
| </fieldset> | ||||||||||||||||||
| <fieldset> | ||||||||||||||||||
| <legend>Additional info</legend> | ||||||||||||||||||
| <div class="form"> | ||||||||||||||||||
| Comments: | ||||||||||||||||||
| <textarea name="textarea"></textarea> | ||||||||||||||||||
| </div> | ||||||||||||||||||
| <div class="formlast"> | ||||||||||||||||||
| <label> | ||||||||||||||||||
| Would you recommend us? | ||||||||||||||||||
| <select name="recommend" | ||||||||||||||||||
| id="recommend" | ||||||||||||||||||
| > | ||||||||||||||||||
| <option value="yes">yes</option> | ||||||||||||||||||
| <option value="no">no</option> | ||||||||||||||||||
| </select> | ||||||||||||||||||
| </label> | ||||||||||||||||||
| </div> | ||||||||||||||||||
| </fieldset> | ||||||||||||||||||
|
|
||||||||||||||||||
|
|
||||||||||||||||||
| <div class="form"> | ||||||||||||||||||
| <input type="submit" value="Submit"> | ||||||||||||||||||
| </div> | ||||||||||||||||||
|
|
||||||||||||||||||
| </form> | ||||||||||||||||||
|
|
||||||||||||||||||
| <script type="text/javascript" src="./main.js"></script> | ||||||||||||||||||
| </body> | ||||||||||||||||||
| </html> | ||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,8 @@ | ||
| /* styles go here */ | ||
| .form { | ||
| 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. Dont style using tags, add propper class name and style using it
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 corrected my code, please check now |
||
| margin-bottom: 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.
Change class name so it is not missleading. This HTML does not represents form, it is more like field-wrapper
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 have corrected my code, please check now