Skip to content
Open
Show file tree
Hide file tree
Changes from 24 commits
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
4 changes: 2 additions & 2 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/)
- [DEMO LINK](https://arturgorniak.github.io/layout_html-form/)
- [TEST REPORT LINK](https://arturgorniak.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
236 changes: 232 additions & 4 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,245 @@
<!doctype html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta
charset="UTF-8"
>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Overall when there is less than 3 attributes in a tag there is no need for spreading it into several lines. We do it when the attribute list is long for readability so this should simply be:

Suggested change
<meta
charset="UTF-8"
>
<meta charset="UTF-8">

<meta
name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
content="width=device-width, user-scalable=no, initial-scale=1.0,
maximum-scale=1.0, minimum-scale=1.0"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Dont spread attribute value, put it in a one line

Suggested change
content="width=device-width, user-scalable=no, initial-scale=1.0,
maximum-scale=1.0, minimum-scale=1.0"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"

>
<meta
http-equiv="X-UA-Compatible"
content="ie=edge"
>
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>HTML Form</title>
<link rel="stylesheet" href="./style.css">
</head>

<body>
<h1>HTML Form</h1>
<form
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Please fix the formatting of the code. You have to use the correct code indentations.

Look Dorota's mentions before and apply it in the whole code :)

    <form 
       action="https://mate-academy-form-lesson.herokuapp.com/create-application"
       method="post"
       name="personalInformation"
    >

action="https://mate-academy-form-lesson.herokuapp.com/create-application"
method="post"
name="personalInformation"
>
<fieldset class="form-fieldset">
<legend>Personal information</legend>
<div class="form-field">
<label for="surname">
Surname:

<input
type="text"
autocomplete="off"
id="surname"
name="surname"
>

</label>
</div>
<div class="form-field">
<label for="name">
Name:

<input
type="text"
autocomplete="off"
id="name"
name="name"
>

</label>
</div>
<div class="form-field">
<label for="age">
How old are You?

<input
type="number"
id="age"
min="1"
max="100"
value="12"
name="age"
>

</label>
</div>
<div class="form-field">
<label for="date">
Full date of birth:

<input
type="date"
id="date"
name="date"
>

</label>
</div>
<div class="form-field">
<label for="agreement">
I accept the term of the agreement

<input
type="checkbox"
name="agreement"
id="agreement"
required
>

</label>
</div>
</fieldset>
<fieldset class="form-fieldset">
<legend>Registration</legend>
<div class="form-field">
<label for="email">
E-mail:

<input
type="email"
name="email"
id="email"
placeholder="[email protected]"
>

</label>
</div>
<div class="form-field">
<label for="password">
Password:

<input
type="password"
name="password"
id="password"
minlength="6"
maxlength="15"
>

</label>
</div>
</fieldset>
<fieldset class="form-fieldset">
<legend>An interesting fact about you!</legend>
<div class="form-field">
<label for="cats">
Do you love cats?

<input
type="radio"
name="cats"
id="catsYes"
>
Yes

<input
type="radio"
name="cats"
id="catsNo"
>
No
Comment on lines +132 to +142
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Make Yes and No values a clicable lables so it focuses on the correct input when clicked


</label>
</div>
<div class="form-field">
<label for="color">
What is your favorite color?

<input
type="color"
name="color"
id="color"
>

</label>
</div>
<div class="form-field">
<label for="sleep">
What time do you go to bed?

<input
type="time"
name="sleep"
id="sleep"
>

</label>
</div>
<div class="form-field">
<label for="cars">
What are your favorite brand of cars?

<select
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fix formatting

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fix formating for this select tag, add indentations

name="cars"
id="cars"
multiple>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fix formating for this select tag, add indentations like:

Suggested change
name="cars"
id="cars"
multiple>
<select
name="cars"
id="cars"
multiple
>

<option value="bmw">BMW</option>
<option value="audi">Audi</option>
<option value="lada">Lada</option>
</select>

</label>
</div>
<div class="form-field">
<label for="rating">
How do you rate our work?

<input
type="range"
name="rating"
id="rating"
value="0"
>

</label>
</div>
</fieldset>
<fieldset class="form-fieldset">
<legend>Additional info:</legend>
<div class="form-field">
<label for="comments">
Comments:

<textarea
name="comments"
autocomplete="off"
id="comments"
cols="20"
rows="2"
></textarea>

</label>
</div>
<div class="form-field">
<label for="recomendation">
Would you recomend us?

<select
name="recomendation"
id="recomendation">
<option value="yes">Yes</option>
<option value="no">No</option>
</select>

</label>
</div>
</fieldset>
<div class="form-field">
<label for="submit">

<input
id="submit"
type="submit"
value="Submit"
>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

remove empty line

</label>
</div>
</form>
<script type="text/javascript" src="./main.js"></script>
</body>
</html>
11 changes: 11 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
/* styles go here */
.form-field {
margin-bottom: 10px;
}

.form-field:last-child {
margin-bottom: 0;
}

.form-fieldset {
margin-bottom: 20px;
}