Html/Elements/input/radio

From W3C Wiki
< Html‎ | Elements‎ | input

<input type="radio">

The radio button state represents a type attribute whose value is "radio" represents a selection of one item from a list of items (a radio button).


HTML Attributes

  • checked = boolean
    Gives the default checkedness of the input element.


  • name = string
    Gives the name of the input element.


  • required = boolean
    When specified, the element is required.


  • value = string
    Gives the default value of the input element.


Example

Example A

[try it]

<label><input type="radio" name="male" checked> male</label>
<label><input type="radio" name="famale"> famale</label>

HTML Reference

The HTML5 specification defines the Radio state in 4.10.7.1.17 RADIO BUTTON STATE.