Difference Between Radio Button And Checkbox? [HTML]

Difference Between Radio Button And Checkbox-First of all, before discussing about the difference between checkbox and radio button we should discuss what is checkbox? And what is radio button?

What Is Radio Button?

Radio button in a form means you have to check one option among all the options. This means from a graphical representation you could answer a single value from a given set of other options.

Eg. What is your gender?


These radio buttons are also used in digital platforms or websites by the HTML language.

The example of a web page radio button using HTML code is here

<!DOCTYPE html>
<form action=”/action_page.php”>
<input type=”radio” name=”gender” value=”male”> Male<br>
<input type=”radio” name=”gender” value=”female”> Female<br>
<input type=”radio” name=”gender” value=”other”> Other<br>
<input type=”submit” value=”Submit”>

What Is Checkbox?

According to Oxford dictionary, checkbox means “A small box on a form into which a tick or other mark is entered as the response to a question”

Then according to IT and our view, a checkbox is a box in a single form where a symbolic instruction or mark is provided as to response the question.

It means for a shorten question in a form they provide a space where you can mark it or leave it blank or in some cases, there may be so many options for a single question and you have to select a single one or many. 

Eg. Do you have vehicles? 

I have a bike
I have a car
here by submitting you will be redirected to amazon mens kurta this is called the form action here the action page is redirected to mens kurta

Checkboxes are not only used in forms but also used in digital forms websites form fill up and at so many ways we use checkboxes.

The checkbox can also be made by using hypertext mark up language [HTML] in web pages.

Here is the example of web page code for making checkbox using hypertext mark up language [HTML].

<form action=”https://amzn.to/2H36iNn“>
<input type=”checkbox” name=”vehicle” value=”Bike”> I have a bike<br>
<input type=”checkbox” name=”vehicle” value=”Car” checked> I have a car<br>
<input type=”submit” value=”Submit”>

Hence we can also make checkboxes using other coding languages.

Read Also: What Is The Difference Between Internet And Intranet?

Difference Between Radio Button And Checkbox

  • The main difference between checkbox and radio button is we can mark or check all the options over the checkbox but we can mark a single option on radio button.
  • Radio buttons are used for a specific answer and the checkbox are used for getting multiple answers
  • In HTML the code for the checkbox and the radio button is different like for the checkbox we write input type= “checkbox”, and for the radio button we write input type= “radio”.

Thank you for reading this article if you have any doubt about the difference between radio button and checkbox you can comment below and also you have any new idea about this you can let us know by the comment section below.

Anurag Yadav

Hello, Viewers My Self Anurag Yadav And I Am Founder Of This Blog [ TrickyTech.org ] Which Is Related To Tech.