Skip to content

Instantly share code, notes, and snippets.

@luismartinezs
Last active September 4, 2022 14:49
Show Gist options
  • Save luismartinezs/fb91a25d03c3747c7da5dc784a0ceeca to your computer and use it in GitHub Desktop.
Save luismartinezs/fb91a25d03c3747c7da5dc784a0ceeca to your computer and use it in GitHub Desktop.
Fieldset and legend #a11y #html
<!-- https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset -->
<form>
<fieldset>
<legend>Choose your favorite monster</legend>
<input type="radio" id="kraken" name="monster" />
<label for="kraken">Kraken</label><br />
<input type="radio" id="sasquatch" name="monster" />
<label for="sasquatch">Sasquatch</label><br />
<input type="radio" id="mothman" name="monster" />
<label for="mothman">Mothman</label>
</fieldset>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment