Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions readme.md
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/)
Replace `<Iryna1802>` with your Github username and copy the links to Pull Request description:
- [DEMO LINK](https://<Iryna1802>.github.io/layout_html-form/)
- [TEST REPORT LINK](https://<Iryna1802>.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)
___
Expand Down Expand Up @@ -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@example.com`.
- 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
Expand Down
146 changes: 144 additions & 2 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,149 @@
<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 class="block">
<legend>Personal information</legend>
<label for="surname">Surname:</label>
<input
class="data"
type="text"
id="surname"
name="surname"
autocomplete="off"
><br>
<label for="name">Name:</label>
<input
class="data"
type="text"
id="name"
name="name"
autocomplete="off"
><br>
<label for="old">How old are You?</label>
<input
class="data"
type="number"
id="old"
name="name"
min="1"
max="100"
value="12"
><br>
<label for="birth">Full date of birth:</label>
<input
class="data"
type="date"
id="birth"
name="birth"
><br>
<label for="agree">I accept the term of the agreement</label>
<input
type="checkbox"
id="agree"
name="agree"
required
>
</fieldset>

<fieldset class="block">
<legend>Registration</legend>
<label for="email">E-mail:</label>
<input
type="email"
id="email"
name="email"
placeholder="email@example.com"
class="data"
><br>
<label for="pwd">Password:</label>
<input
type="password"
id="pwd"
name="pwd"
minlength="4"
maxlength="8"
>
</fieldset>

<fieldset class="block">
<legend>An interesting fact about you!</legend>
<div class="data">
Do you love cats?
<label>
<input type="radio" name="yes">
Yes
</label>
<label>
<input type="radio" name="no">
No
</label>
</div>
<label for="color">What is your favorite color?</label>
<input
type="color"
id="color"
name="color"
class="data"
><br>
<label for="timeGotoBed">What time do you go to bed?</label>
<input
type="time"
step="1"
id="timeGotoBed"
name="timeGotoBed"
class="data"
><br>
<div class="data">
<label for="brandCar">What are your favorite brand of cars?</label>
<select
name="brandsCars"
id="brandCar"
multiple
>
<option value="BMW">BMW</option>
<option value="Audi">Audi</option>
<option value="Lada">Lada</option>
</select>
</div>

<label for="rateWork">How do you rate our work?</label>
<input
type="range"
name="rateWork"
id="rateWork"
value="0"
>
</fieldset>

<fieldset class="block">
<legend>Additional info:</legend>
<div class="data">
<label for="comments">Comments:</label>
<textarea
id="comments"
name="comments"
>
</textarea><br>
</div>
<div>
<label for="recommend">Would you recommend us?</label>
<select
name="recommend"
id="recommend"
>
<option value="yes">Yes</option>
<option value="no">No</option>
</select>
</div>
</fieldset>

<input
class="data"
type="submit"
value="Submit"
>
</form>
</body>
</html>
9 changes: 8 additions & 1 deletion src/style.css
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
/* styles go here */
.data {
margin-bottom: 10px;

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the empty line.

}

.block {
margin-bottom: 20px;
}