Planet For Application Life Development Presents
MY IT World

Explore and uptodate your technology skills...

HTML - Radio

HTML - Radio Forms

Radio form elements resemble the "Scan-Tron" sheets you may have used when you were in school to take a test. They basically allow the user to "bubble" in their choice and limit each question to only one selection per radio group.

Place a radio element on to your web page by setting the type attribute of the <input> tag to "radio".

HTML Radio Input Code

<form name="myWebForm" action="" method="post">
<h4>Please select your favorite food category.</h4>
<input type="radio" name="food" /> : Italian<br />
<input type="radio" name="food" /> : Greek<br />
<input type="radio" name="food" /> : Chinese<br />

HTML Radio Fields

Please select your favorite food category.

: Italian
: Greek
: Chinese

By naming each field similarly with a type of cuisine, we have created a relation, or a "grouping," of radio elements. This is how we link each element together and assure that the user is able to select only one answer.