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

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


A form with radio buttons:<p>Choose your favorite Web language:</p>

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

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

This is how the HTML code above will be displayed in a browser:

Choose your favorite Web language: 

  • HTML
  •  CSS
  •  JavaScript

Additional Reading

Categories: Latest Post


Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *