- Replace
<your_account>
with your Github username in the link - Follow this instructions
- There are no tests for this task so use
npm run lint
command instead ofnpm test
- There are no tests for this task so use
Look at this form... Looks like something is missing here. Labels? Placeholders? Yeah..
Your task is to make script, which is able to fix all problems in this form.
- Add
<label>
for inputs. - Add placeholders for each input.
Both rely on the name
of input.
You can read about placeholders and labels here:
- Get all
inputs
fromform
tag on the page. - For each
input
element create elementlabel
withclass
field-label
(it needs for correct style applying) andfor
attribute where setid
of current input. SettextContent
for label rely oninput
name. - For each
input
setplaceholder
rely oninput
name. Capitalize it. - Append
label
elements to the parent container ofinput
(do not cover inputs by the label in this task) - Done.
Hints: p.2 and p.4 can be done in one loop circle
You no need to change styles or HTML layout in this task. Change only main.js
file.
Expected result: