Tutorials

KodeKite Tools

HTML
Flexbox
SVG
Canvas
HTML Tutorial

More


HTML Input Radio
Input Radio

Input radio type is used to create small circle button, input is open tag. Radio is used in forms or anywhere else to collect data from users, and provides multiple options to users.

Syntax

<input type=radio value=radio name />


You can use radio in forms and any where within an HTML document.


Example

Apple Banana

Input is unpair tag and output of radio is option for data like you can see in above example.


Practice Task

Open notepad or any other text editor, follow the following points.


  • Create a form
  • Create three radio button
  • Assign value=Male to button one
  • Assign value=Female to button two
  • Assign value=Other to button three
  • Use input type submit with value=Send Option

save file with name task.html or task.htm and then open it using any browser and see results.


Solution

Male female Other

Don't forget input is empty element which means it always comes in single not in pair.