HTML and CSS Reference
In-Depth Information
5.
<input type="text" name="username">
6.
</label>
7.
<label>
8.
Password
9.
<input type="text" name="password">
10.
</label>
11.
</fieldset>
Figure 10.19
Form controls and labels organized within a
<fieldset>
element that
includes a
<legend>
element
Form & Input Attributes
To accommodate all of the different form, input, and control elements, there are a number
of attributes and corresponding values. These attributes and values serve a handful of dif-
ferent functions, such as disabling controls and adding form validation. Described next are
some of the more frequently used and helpful attributes.
Disabled
The
disabled
Boolean attribute turns off an element or control so that it is not available
for interaction or input. Elements that are disabled will not send any value to the server for
form processing.
Applying the
disabled
Boolean attribute to a
<fieldset>
element will disable all of
the form controls within the fieldset. If the
type
attribute has a
hidden
value, the
hid-
den
Boolean attribute is ignored.
1.
<label>
2.
Username
3.
<input type="text" name="username"
disabled
>
4.
</label>
Figure 10.20
A disabled input form control
Search WWH ::
Custom Search