-
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
Added task solution #782
base: master
Are you sure you want to change the base?
Added task solution #782
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://kyrylomanko.github.io/layout_html-form/) | ||
- [TEST REPORT LINK](https://kyrylomanko.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,148 @@ | |||||||||||
<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> | ||||||||||||
<label for="surname">Surname:</label> | ||||||||||||
<input | ||||||||||||
cletype="text" | ||||||||||||
class="distance" | ||||||||||||
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 more meaningful class names. For example:
Suggested change
|
||||||||||||
id="surname" | ||||||||||||
name="surname" | ||||||||||||
autocomplete="off" | ||||||||||||
><br> | ||||||||||||
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. Why do you need these
Suggested change
|
||||||||||||
|
||||||||||||
<label for="name">Name:</label> | ||||||||||||
<input | ||||||||||||
type="text" | ||||||||||||
class="distance" | ||||||||||||
id="name" | ||||||||||||
name="name" | ||||||||||||
autocomplete="off" | ||||||||||||
><br> | ||||||||||||
|
||||||||||||
<label for="age">How old are You?</label> | ||||||||||||
<input | ||||||||||||
type="number" | ||||||||||||
class="distance" | ||||||||||||
id="age" | ||||||||||||
name="age" | ||||||||||||
min="1" | ||||||||||||
max="100" | ||||||||||||
value="12" | ||||||||||||
><br> | ||||||||||||
|
||||||||||||
<label for="birth">Full date of birth:</label> | ||||||||||||
<input | ||||||||||||
type="date" | ||||||||||||
class="distance" | ||||||||||||
id="birth" | ||||||||||||
name="birth" | ||||||||||||
><br> | ||||||||||||
|
||||||||||||
<label for="checkbox">I accept the term of the agreement</label> | ||||||||||||
<input | ||||||||||||
type="checkbox" | ||||||||||||
id="checkbox" | ||||||||||||
name="checkbox" | ||||||||||||
> | ||||||||||||
|
||||||||||||
</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.
Suggested change
|
||||||||||||
|
||||||||||||
<fieldset> | ||||||||||||
<legend>Registration</legend> | ||||||||||||
<label for="email">E-mail:</label> | ||||||||||||
<input | ||||||||||||
type="email" | ||||||||||||
class="distance" | ||||||||||||
id="email" | ||||||||||||
name="email" | ||||||||||||
placeholder="[email protected]" | ||||||||||||
><br> | ||||||||||||
|
||||||||||||
<label for="password">Password:</label> | ||||||||||||
<input | ||||||||||||
type="password" | ||||||||||||
id="password" | ||||||||||||
name="password" | ||||||||||||
> | ||||||||||||
|
||||||||||||
</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. Don't add spaces between parent and child elements
Suggested change
|
||||||||||||
|
||||||||||||
<fieldset> | ||||||||||||
<legend>An interesting fact about you!</legend> | ||||||||||||
<div class="distance"> | ||||||||||||
<label for="cat"> | ||||||||||||
Do you love cats? | ||||||||||||
<input type="radio" name="Yes"> | ||||||||||||
Yes | ||||||||||||
<input type="radio" name="No"> | ||||||||||||
No | ||||||||||||
</label> | ||||||||||||
</div> | ||||||||||||
<label for="color">What is your favorite color?</label> | ||||||||||||
<input | ||||||||||||
type="color" | ||||||||||||
class="distance" | ||||||||||||
id="color" | ||||||||||||
name="color" | ||||||||||||
><br> | ||||||||||||
|
||||||||||||
<label for="time">What time do you go to bed?</label> | ||||||||||||
<input | ||||||||||||
type="time" | ||||||||||||
step="1" | ||||||||||||
class="distance" | ||||||||||||
id="time" | ||||||||||||
name="time" | ||||||||||||
><br> | ||||||||||||
|
||||||||||||
<div class="distance"> | ||||||||||||
<label for="car">What are your favorite brand of cars?</label> | ||||||||||||
<select | ||||||||||||
name="car" | ||||||||||||
id="car" | ||||||||||||
multiple | ||||||||||||
> | ||||||||||||
<option value="BMW">BMW</option> | ||||||||||||
<option value="Audi">Audi</option> | ||||||||||||
<option value="Lada">Lada</option> | ||||||||||||
</select> | ||||||||||||
</div> | ||||||||||||
|
||||||||||||
<label for="rate">How do you rate our work?</label> | ||||||||||||
<input | ||||||||||||
type="range" | ||||||||||||
value="0" | ||||||||||||
name="rate" | ||||||||||||
id="rate" | ||||||||||||
> | ||||||||||||
</fieldset> | ||||||||||||
|
||||||||||||
<fieldset> | ||||||||||||
<legend>Additional info:</legend> | ||||||||||||
<div class="distance"> | ||||||||||||
<label for="cm">Comments:</label> | ||||||||||||
<textarea autocomplete="off"></textarea> | ||||||||||||
</div> | ||||||||||||
|
||||||||||||
<div> | ||||||||||||
<label for="rec">Would you recommend us?</label> | ||||||||||||
<select name="rec" id="rec"> | ||||||||||||
<option value="yes">Yes</option> | ||||||||||||
<option value="no">No</option> | ||||||||||||
</select> | ||||||||||||
</div> | ||||||||||||
|
||||||||||||
</fieldset> | ||||||||||||
|
||||||||||||
<input | ||||||||||||
type="submit" | ||||||||||||
value="Submit" | ||||||||||||
> | ||||||||||||
|
||||||||||||
</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 */ | ||
.distance { | ||
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. Don't style tags, use class selector instead |
||
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.
You should add these links to the PR description