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:
@ -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">
|
||||
|
Reference in New Issue
Block a user