-
Notifications
You must be signed in to change notification settings - Fork 625
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
add task solution #788
base: master
Are you sure you want to change the base?
add task solution #788
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 |
---|---|---|
@@ -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://IvanRovenko.github.io/layout_html-form/) | ||
- [TEST REPORT LINK](https://IvanRovenko.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 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,160 @@ | |
<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 class="form"> | ||
<legend>Personal information</legend> | ||
|
||
<div class="form-field"> | ||
Surname: | ||
<input | ||
type="text" | ||
name="Surname" | ||
autocomplete="off" | ||
> | ||
</div> | ||
|
||
<div class="form-field"> | ||
Name: | ||
<input | ||
type="text" | ||
name="Name" | ||
maxlength="25" | ||
autocomplete="off" | ||
> | ||
</div> | ||
|
||
<div class="form-field"> | ||
How old are You? | ||
<input | ||
type="number" | ||
name="How old are You?" | ||
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 name for the 'name' attribute. For example, 'age'. |
||
min="1" | ||
max="100" | ||
value="12" | ||
> | ||
</div> | ||
|
||
<div class="form-field"> | ||
Full date of birth: | ||
<input | ||
type="date" | ||
name="Full date of 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. Use a more descriptive name for the 'name' attribute. For example, 'dateOfBirth'. |
||
> | ||
</div> | ||
|
||
<div class="form-field"> | ||
I accept the term of the agreement | ||
<input | ||
type="checkbox" | ||
name="I accept the term of the agreement" | ||
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 name for the 'name' attribute. For example, 'termsAgreement'. |
||
> | ||
</div> | ||
</fieldset> | ||
|
||
<fieldset class="form"> | ||
<legend>Registration</legend> | ||
|
||
<div class="form-field"> | ||
E-mail: | ||
<input | ||
type="email" | ||
name="E-mail" | ||
placeholder="[email protected]" | ||
> | ||
</div> | ||
<div class="form-field"> | ||
Password: | ||
<input | ||
type="password" | ||
name="Password" | ||
minlength="5" | ||
> | ||
</div> | ||
</fieldset> | ||
|
||
<fieldset class="form"> | ||
|
||
<legend>An interesting fact about you!</legend> | ||
|
||
<div class="form-field"> | ||
Do you love cats? | ||
<label> | ||
<input | ||
type="radio" | ||
name="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. Radio buttons for the same question should have the same 'name' attribute. Change the 'name' attribute to 'loveCats' for both 'Yes' and 'No' options. |
||
> | ||
Yes | ||
</label> | ||
|
||
<label> | ||
<input | ||
type="radio" | ||
name="No" | ||
> | ||
No | ||
</label> | ||
</div> | ||
|
||
<div class="form-field"> | ||
What is your favorite color? | ||
<input | ||
type="color" | ||
name="color" | ||
> | ||
</div> | ||
|
||
<div class="form-field"> | ||
What time do you go to bed? | ||
<input | ||
type="time" | ||
name="time" | ||
> | ||
</div> | ||
|
||
<div class="form-field"> | ||
What are your favorite brend of cars? | ||
<label> | ||
<select name="car" multiple> | ||
<option value="BMW">BMW</option> | ||
<option value="Audi">Audi</option> | ||
<option value="Jeep">Lada</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. The option text should match the value attribute. Change the option text to 'Lada' instead of 'Jeep'. |
||
</select> | ||
</label> | ||
</div> | ||
<div class="form-field"> | ||
How do you rate our work? | ||
<input | ||
type="range" | ||
name="rate worl" | ||
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 name for the 'name' attribute. For example, 'workRating'. |
||
> | ||
</div> | ||
</fieldset> | ||
|
||
<fieldset class="form"> | ||
<legend>Aditional info</legend> | ||
|
||
<div class="form-field"> | ||
Comments: | ||
<textarea | ||
name="Comments" | ||
></textarea> | ||
</div> | ||
|
||
<div class="form-field"> | ||
Would you recommend us? | ||
<label> | ||
<select name="recommend" required> | ||
<option value="Yes">Yes</option> | ||
<option value="No">No</option> | ||
</select> | ||
</label> | ||
</div> | ||
|
||
</fieldset> | ||
<button type="submit">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,17 @@ | ||
/* styles go here */ | ||
.body { | ||
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 'body' instead of '.body' to select the body element. |
||
margin: 0; | ||
} | ||
|
||
.form { | ||
margin-bottom: 20px; | ||
|
||
} | ||
|
||
.form-field { | ||
|
||
padding-bottom: 10px; | ||
} | ||
|
||
.form-field:last-child { | ||
padding-bottom: 0; | ||
} | ||
Comment on lines
+5
to
+17
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. no needs to add all of these classes.
|
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.
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.
Hi, i need chenge oll div to label ?