Tell us what’s happening:
Is it mandatory to use label tag to create radio buttons? I tried creating radio buttons without label tag and I can see them on the webpage without any issues. My code is as follows. Can anyone explain me the differences between these two? and where to use the first and the second. If possible give me a real time example. Thank u
Your code so far
<label>
<input type="radio" name="indoor-outdoor">Indoor
</label>
and
<input type="radio" name="indoor-outdoor">Indoor<br>
Your browser information:
Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36
.
Link to the challenge:
https://www.freecodecamp.org/challenges/create-a-set-of-checkboxes