input type = "radio" creates a radio button
<?xml version = "1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml">
<body>
<form method = "post" action = "/cgi-bin/formmail">
<p>
<strong>How did you get to our site?:</strong><br />
<label>Search engine
<input name = "howtosite" type = "radio"
value = "search engine" checked = "checked" />
</label>
<label>Links from another site
<input name = "howtosite" type = "radio"
value = "link" /></label>
<label>Deitel.com Web site
<input name = "howtosite" type = "radio"
value = "deitel.com" /></label>
<label>Reference in a book
<input name = "howtosite" type = "radio"
value = "book" /></label>
<label>Other
<input name = "howtosite" type = "radio"
value = "other" /></label>
</p>
</form>
</body>
</html>
Related examples in the same category