Labelling Radio Buttons : radio : Form Style HTML CSS TUTORIALS


HTML CSS TUTORIALS » Form Style » radio »

 

Labelling Radio Buttons


 

<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitionalt//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
  <head>
    <title>Labelling Radio Buttons</title>
    <style rel="stylesheet" type="text/css">
body {
  color: #000000;
  background-color: #ffffff;
  font-family: arial, verdana, sans-serif;
  font-size: 12pt;
}

fieldset {
  font-size: 12px;
  padding: 10px;
  width: 250px;
}

label:hover {
  cursor: hand;
}
</style>
  </head>
  <body>

<form name="frmExample" action="" method="post">
<fieldset>
<legend>How did you hear about us?</legend>
  <input type="radio" id="referrer1" name="radReferrer" value="M" />
     <label for="referrer1" >W</label><br />
  <input type="radio" id="referrer2" name="radReferrer" value="G" />
     <label for="referrer2" >G</label><br />
  <input type="radio" id="referrer3" name="radReferrer" value="M" />
     <label for="referrer3" >M</label><br />
  <input type="radio" id="referrer4" name="radReferrer" value="Other" />
     <label for="referrer4" >Other</label>&nbsp;&nbsp;
  <input type="text" name="txtOther" size="12" /><br />
<input type="submit" value="Submit" />
</fieldset>
</form>

</body>
</html>

 



HTML code for linking to this page:

Follow Navioo On Twitter

HTML CSS TUTORIALS

 Navioo Form Style
» radio