Name

radio

Type

_input

Synopsis

How to use radio buttons

Description

_input elements of type radio are generally used in radio groups—collections of radio buttons describing a set of related options. Only one radio button in a given group can be selected at the same time. Radio buttons are typically rendered as small circles, which are filled or highlighted when selected.

Parameters

_input type="radio"

All other valid HTML5 attributes are allowed

Example

<p>Select a maintenance drone:</p>
<div>
  <_input type="radio" id="huey" name="drone" value="huey" />
  <_label for="huey">Huey</_label>
</div>

<div>
  <_input type="radio" id="dewey" name="drone" value="dewey" checked="checked" />
  <_label for="dewey">Dewey</_label>
</div>

<div>
  <_input type="radio" id="louie" name="drone" value="louie" />
  <_label for="louie">Louie</_label>
</div>

Select a maintenance drone:

 
 
 
 
 
 

Note

Radio buttons are similar to checkboxes, but with an important distinction — radio buttons are grouped into a set in which only one radio button can be selected at a time, whereas checkboxes allow you to turn single values on and off. Where multiple controls exist, radio buttons allow one to be selected out of them all, whereas checkboxes allow multiple values to be selected.

Links

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/radio

ws-page-props