<input type="radio" /> Description:
The <input type="radio" /> tag puts radio buttons on form documents.
<input type="radio" /> Web Browser Support:
- Netscape 2, 3, 4, 6, 7
- Mozilla 1
- Firefox 1
- Internet Explorer 2, 3, 4, 5, 6
- Opera 3, 4, 5, 6, 7, 8
- Safari 1
- WebTV / MSNTV
- AvantGo Palm OS
- AvantGo Windows CE
- HTML 3.2, 4.0
- XHTML 1.0
XHTML Forms Module XHTML Intrinsic Events Module
<input type="radio" /> Attributes:
- All the attributes of the input tag, plus:
- checked (optional)
- name (optional)
- readonly (optional)
- type="radio"
- usestyle (optional) (WebTV)
- value (optional)
- width (optional) (WebTV)
<input type="radio" /> Usage:
- standard radio button:
<form>
Do you understand?<br />
Yes <input type="radio" name="understand" value="yes" />
No <input type="radio" name="understand" value="no" />
</form> - multiple radio buttons with the same name:
<form>
What type of pet do you have?
cat <input type="radio" name="pet" value="cat">
dog <input type="radio" name="pet" value="dog">
rabbit <input type="radio" name="pet" value="rabbit" checked>
</form>
- radio button with some styles added:
<form>
<input type="radio" value="Me" style="background-color:#cc0000; color: #ffffff;" />
</form>
<input type="radio" /> Special Notes:
- Give several radio buttons the same name (as in example 2) to send a single value of a group to the server. This is the same as having a multiple choice question where only one answer is allowed.
More <input type="radio" /> Information:
Return to the <input /> Element
Return to XHTML Element (HTML Tags) Library

