Under the section Basic HTML and HTML5: Create a set of radio buttons, there is something that really confuses me.
When creating the set of radio buttons, you start with < label >, which makes sense. But then you add the input and close that out with < /label >
However, if you watch the video provided for that section, he preforms that action in a different way then you actually complete in the challenge.
He does it by putting < input > then < label >, which he said that allows you to be able to click the text or the button to select your answer choice, but which is the preferred method?
Below are the examples I am referring to:
(the way you do it correctly inside of the challenge)
< label >
< input type=“radio” name=“indoor-outdoor” >Outdoor
< /label >
(the way he does it in the video)
< input id=“indoor” type=“radio” name=“indoor-outdoor” >
< label for=“indoor”>Indoor
Which way is correct? The way I did it above allows me to complete the challenge, but I want to make sure that I am doing things the right way.