Skip to content
Related Articles

Related Articles

Improve Article

HTML | <input type=”radio”>

  • Difficulty Level : Basic
  • Last Updated : 29 May, 2019

The HTML <input type=”radio”> is used to define a Radio Button. Radio Buttons are used to let the user select exactly one option from a list of predefined options. Radio Button input controls are created by using the “input” element with a type attribute having value as “radio”.

Syntax:

<input type="radio"> 

Example:




<!DOCTYPE html> 
<html
  
<head
    <title>
        HTML input type radio
    </title>
      
    <style
        body { 
            text-align: center; 
        
        h1 { 
            color: green; 
        
    </style
</head
  
<body
    <h1
        GeeksforGeeks 
    </h1
  
    <h2
        HTML <Input type= "radio"
    </h2
      
    Radio Button: 
    <input type="radio" checked=true id="radioID"
        value="Geeks_radio" name="Geek_radio"
</body
  
</html>                    

Output:

Supported Browsers: The browsers supported by <input type=”radio”> are listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Safari
  • Opera

Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.




My Personal Notes arrow_drop_up
Recommended Articles
Page :