HTML and CSS Reference
In-Depth Information
<fieldset>
<legend>Your Info</legend>
<div class="field">
<label for="fname">First Name:</label>
<input type="text" name="fname" id="fname">
</div>
<div class="field">
<label for="lname">Last Name:</label>
<input type="text" name="lname" id="lname">
</div>
<div class="field">
<label for="phone1">Phone Number:</label>
<input type="text" name="phone1" id="phone1" size="3">
<input type="text" name="phone2" id="phone2" size="3">
<input type="text" name="phone3" id="phone3" size="4">
</div>
</fieldset>
Figure 11.5
A two-column
form layout.
note Although including the input field element inside the label tag is
valid HTML and doing so might allow for easier styling in this scenario,
this is considered a bad practice because of accessibility concerns.
 
Search WWH ::




Custom Search