HTML Radio Tag

The HTML <Radio> button is employed to specify radio buttons, which are accentuated upon selection. This form component permits users to choose just one option from a provided set of choices.

It is generated by the type attribute of the <input> tag as illustrated in the syntax below:

Example

<input type="radio" name ="Any_name"/>

Example

Example

html>

<head>

</head>

<title> Example of Radio Button</title>

<body>

<form>

  

<label>

Gender: 

</label>  <br>

<input type="radio" id="gender" name="gender" value="male"/> Male  

<br>

<input type="radio" id="gender" name="gender" value="female"/> Female <br/> 

</form>  

</body>

</html>

Output:

Browser Support

Element Chrome IE Firefox Opera Safari
<radio> Yes Yes Yes Yes Yes

Input Required

This code uses input(). Please provide values below: