From W3C Wiki
< HTML‎ | Elements‎ | input
Jump to: navigation, search

<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 A

[try it]

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

Input radio01.png

HTML Reference

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