ITSourceCode.com

We Exist to Provide 100% Free Source Code and Tutorials

Custom Search

25-HTML Radiobutton

Radio form elements are similar  to the  “Scan-Tron” sheets that is used when taking a test in school.  This simply allows the user to choose one selection in each question.

 

Radiobutton used <input> tag and the type attribute was set to  “radio” .

 

Example:

<h3>Please select your civil status.</h3>
<input type="radio" name="status" /> Single<br />
<input type="radio" name="status" /> Married<br />
<input type="radio" name="status" /> Widow<br />

 

 

Example on how to set a radiobutton with a default checked every time the HTML page is loaded:

<h3>Please select your civil status.</h3>
<input type="radio" name="status" checked="true" /> Single<br />
<input type="radio" name="status" />  Married<br />
<input type="radio" name="status" />  Widow<br />
Facebook Comments

Check Your Domain Ranking

Leave a Reply

Your email address will not be published. Required fields are marked *

ITSourceCode.com © 2016 Frontier Theme

Subscribe For Latest Updates

Signup for our newsletter and get notified when we publish new articles for free!