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>
1. | radio button | ||
2. | Set input radio button background color and color | ||
3. | Creates a radio button | ||
4. | Labelling Radio Buttons | ||
5. | Use table to layout the radio buttons | ||
6. | Radio Button | ||
7. | Preselected Radio Example |