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
Reffered: https://www.w3schools.com/html/html_forms.asp





Related Articles
What is HTML Forms HTML Forms
What is The <form> Element HTML Forms
What is The <input> Element HTML Forms
What is Text Fields HTML Forms
What is The HTML <label> Element HTML Forms
How to add HTML Radio Buttons HTML Forms
How to create HTML Checkboxes HTML Forms
How to create HTML Submit Button HTML Forms
How to create HTML Name Attribute for <input> HTML Forms
What is HTML Form Attributes HTML Forms

Single Articles
Example of HTML Radio ButtonsHTML Forms

Read Full:
HTML Forms
Category:
Web Tutorial
Sub Category:
HTML Forms
Uploaded:
11 months ago
Uploaded by:
Admin
Views:
211



Share on: