<legend>what computing devices do you use most?</legend>
<div
input type="checkbox" id="phones" name="interest" value= "phones"
<label value="phones"> Phones</label
</div
<div>
< input type="checkbox" id="laptop" name="interest" value= "laptop">
<label value="laptop"> Laptop</label>
</div>
<div>
<input type="checkbox" id="desktop" name="interest" value= "desktop">
<label value="desktop"> Desktop</label>
</div>
this still bring up an error as regards adding value, error message is : " 14. Inside the form element, I can select several fields from a series of checkboxes, each of which must have a value attribute."
please help!!
1 Like
ILM
July 21, 2020, 7:42am
2
I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>
) to add backticks around text.
See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).
1 Like
ILM
July 21, 2020, 7:44am
3
what error do you get below this failed user story? that should tell you what to fix
also it seems you are missing many <
and >
, you will need to make sure you have them all in the right place
also, value
is not a valid attribute for a label element
<legend>what computing devices do you use most?</legend>
<div>
<input type="checkbox" id="phones" name="interest" value= "phones"
<label value="phones"> Phones</label>
</div>
<div>
<input type="checkbox" id="laptop" name="interest" value= "laptop">
<label value="laptop"> Laptop</label>
</div>
<div>
<input type="checkbox" id="desktop" name="interest" value= "desktop">
<label value="desktop"> Desktop</label>
</div>
This should be the correct syntax
ILM
July 21, 2020, 7:54am
6
fix the wrong syntax and it should pass, like the missing <
and >
in the elements around the checkboxes
other possibility is that it doesn’t like that you put them in a div
, but first check the syntax
there is also an Analyze HTML
tool you can use in codepen to help you in that
1 Like
this is exactly what i have:
i decided to use separate div elements to see if that would fix the value attribute error but it still didn’t work.
but the error is not going away… what am i doing wrong?
<div>
<input type="checkbox" id="phones" name="interest" value= "phones">
<label value="phones"> Phones</label>
</div>
<div>
<input type="checkbox" id="laptop" name="interest" value= "laptop">
<label value="laptop"> Laptop</label>
</div>
<div>
<input type="checkbox" id="desktop" name="interest" value= "desktop">
<label value="desktop"> Desktop</label>
</div>
Can you try using “for” attribute in the label tag?
ILM
July 21, 2020, 10:15am
11
they are not inside the form element
they are at lines 12-26
the form start at line 49
2 Likes
manu
July 22, 2020, 8:54am
12
hello sir
the value should be inside the input element and
i.e
< input type="checkbox" id="laptop" name="laptop">
Phones
the label should always be included so that it corresponds to the input ..