webmaster resources tips and articles
webmaster information

Path = Home : Form Tips : How To Create A Radio Button Form

How To Create A Radio Button Form

 

The <input> tag is used to create input fields within a web page form.

You can create a radio button selection list by adding attributes to the input tag. Note that since only one button is to be selected at a time, the name for each button must be the same.

Radio button selection list

<input type="radio" name="option">Choice 1
<input type="radio" name="option">Choice 2
<input type="radio" name="option">Choice 3

Choice 1
Choice 2
Choice 3

 

Setting a default value

You can set a default value by adding checked="checked" to the input tag.

<input type="radio" name="option" checked="checked">Choice 1
<input type="radio" name="option">Choice 2
<input type="radio" name="option">Choice 3

Choice 1
Choice 2
Choice 3

 

 

© janim.net 2000 - 2007 All rights reserved