Horje
How to add HTML Radio Buttons

The <input type="radio"> defines a radio button.

Radio buttons let a user select ONE of a limited number of choices.


Example of HTML Radio Buttons

A form with radio buttons:
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h2>Radio Buttons</h2>

<p>Choose your favorite Web language:</p>

<form>
  <input type="radio" id="html" name="fav_language" value="HTML">
  <label for="html">HTML</label><br>
  <input type="radio" id="css" name="fav_language" value="CSS">
  <label for="css">CSS</label><br>
  <input type="radio" id="javascript" name="fav_language" value="JavaScript">
  <label for="javascript">JavaScript</label>
</form> 

</body>
</html>

Output should be:

Example of HTML Radio Buttons





Category:
Web Tutorial
Sub Category:
HTML Forms
Uploaded by:
Admin


Read Article
https://develop.horje.com/learn/1434/reference