Skip to content
Related Articles
Open in App
Not now

Related Articles

How to add Radio Buttons in form using HTML ?

Improve Article
Save Article
  • Last Updated : 22 Jul, 2021
Improve Article
Save Article

We know that Radio Buttons are used to select only one option out of the several options. It is generally used in HTML form. 

Approach: To add a radio buttons in a webpage, the HTML provides a <input> element with type attribute is set to “radio”.  


<input type="radio">  

Example: Below code illustrates that how to add a radio button in the webpage. 


<!DOCTYPE html>
        body {
            text-align: center;
        h2 {
            color: green;
        How to add a Radio Buttons in form using HTML?
    Select Gender
    <input type="radio" checked=true name="user_gender">
    <input type="radio"  name="user_gender">     


gender of user

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!