Set form access key : legend « Form « HTML / CSS






Set form access key

  
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Form Example</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
fieldset {
  width: 500px;
}

</style>
</head>

<body>

<form action="" method="post" name="">
  <fieldset>
    <legend accesskey="l"><u>L</u>ogin Details (Alt + L)</legend>
    <table>
      <tr>
        <td class="caption">Email address:</td>
        <td><input type="text" name="txtEmail" size="20" /></td>
      </tr><tr>
        <td class="caption">Password</td>
        <td><input type="password" name="txtPwd" size="20" /></td>
      </tr>
    </table>
  </fieldset>
<br /><br />
  <fieldset>
  <legend accesskey="a"><u>A</u>ddress Details (Alt + A)</legend>
    <table>
      <tr>
        <td class="caption">Full name: </td>
        <td><input type="text" name="txtName" size="20" /></td>
      </tr><tr>
        <td class="caption">Street Address 1: </td>
        <td><input type="text" name="txtStreet1" size="40" /></td>
      </tr><tr>
        <td class="caption">Street Address 2: </td>
        <td><input type="text" name="txtStreet2" size="40" /></td>
      </tr><tr>
        <td class="caption">Town: </td>
        <td><input type="text" name="txtTown" size="20" /></td>
      </tr><tr>
        <td class="caption">City: </td>
        <td><input type="text" name="txtCity" size="20" /></td>
      </tr><tr>
        <td class="caption">State / Region: </td>
        <td><input type="text" name="txtState" size="20" /></td>
      </tr><tr>
        <td class="caption">Zip or Postal Code</td>
        <td><input type="text" name="txtZip" size="20" /></td>
      </tr>
    </table>
  </fieldset><br />
  <input type="submit" />
</form>


</body>
</html>

   
  








Related examples in the same category

1.The legend element
2.Style for form legend
3.Set style for legend
4.form legend style
5.Set font, color, background color and text-transform for legend tag
6.Organizing Elements With fieldset and legend Elements
7.legend top: -.4em;
8.legend position: relative;
9.legend font-size: 1.4em;
10.legend font-weight: bold;
11.legend border: 1px solid #888; border-right: 1px solid #666; border-bottom: 1px solid #666;
12.legend padding: .5em;
13.legend background-color: #CCC;
14.legend background: gold;
15.legend border: 1px solid rgb(75, 75, 75);
16.legend color: rgb(75, 75, 75);