Accessibility: Label Element
Example
5.10 - Form Labels - Example 5.10
<form method="get" action="https://cs12.net/form/submit.php">
<p>Do you like to watch NCAA basketball?
</p>
<label>
<input type="radio" name="basketball" value="Y"/>
Yes </label>
<label>
<input type="radio" name="basketball" value="N"/>
No </label>
<button type="submit">Submit </button>
</form>
In style
element
(<style>
) within head
element:
label, button { display: block; }
button { margin-top: 1rem;}