Welcome Guest! (App Version 5.16)

websitnero logo name

HTML Radio Button

Overview

  • Radio Buttons help a user select only 1 out of multiple options.
  • A group of radio buttons must have same value for the name property.

Radio Buttons in HTML

Radio buttons are used to provide a user with options where he can select one of the multiple options. Example of such scenario can be - select your gender, select your religion, select your state, etc.

Example

<form>
  <input type="radio" name="gender" value="male"> Male<br/>
  <input type="radio" name="gender" value="female"> Female<br/>
  <input type="radio" name="gender" value="others"> Others<br/>
  <input type="submit">
</form>

Output:

Male
Female
Others
Further Reading

1. <input type="radio">

WebsiteNero is highly optimized for learning various website developing technlogies. We try our best to add maximum modules and examples to help learn the concepts clearly and vividly. We try to present all content and examples as simple as we can removing any complexity to hurdle easy understanding. We try best provide you with worthful content, but we cannot guarantee full correctness of all the content on this site. While using this website, you agree to have read and accepted all our terms of use and conditions, cookie, and privacy policy. Copyright, 2013-2018 by websitenero.com. All Rights Reserved.