fix (curriculum): added top level label-input pair to challenge (#41717)

* fix (curriculum): added top level label-input pair to challenge

* Update curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/create-a-set-of-radio-buttons.md

Co-authored-by: Shaun Hamilton <51722130+ShaunSHamilton@users.noreply.github.com>

Co-authored-by: Shaun Hamilton <51722130+ShaunSHamilton@users.noreply.github.com>
This commit is contained in:
Hassaan Pasha
2021-04-05 11:41:31 +05:00
committed by GitHub
parent 5c0d74d1db
commit d51460dba8

View File

@ -24,7 +24,14 @@ Here's an example of a radio button:
</label>
```
It is considered best practice to set a `for` attribute on the `label` element, with a value that matches the value of the `id` attribute of the `input` element. This allows assistive technologies to create a linked relationship between the label and the child `input` element. For example:
It is considered best practice to set a `for` attribute on the `label` element, with a value that matches the value of the `id` attribute of the `input` element. This allows assistive technologies to create a linked relationship between the label and the related `input` element. For example:
```html
<input id="indoor" type="radio" name="indoor-outdoor">
<label for="indoor">Indoor</label>
```
We can also nest the `input` element within the `label` tags:
```html
<label for="indoor">