HTML and CSS Reference
In-Depth Information
9.9. General Form-Control Attributes
The many form-control tags contain common attributes that, like most
other tags, generally serve to label, set up the display, extend the text
language, and make the tag extensible programmatically.
9.9.1. The id and title Attributes
The id attribute, as for most other standard tags, lets you attach a
unique string label to the form control and its contents for reference by
programs (applets) and hyperlinks. This name is distinct from the name
assigned to a control element with the name attribute. Names assigned
with the id attribute are not passed to the server when the form is pro-
cessed.
The title attribute is similar to id in that it uses a quote-enclosed string
value to label the form control. However, it titles only the form segment;
you cannot use its value in an applet reference or hyperlink. Browsers
may use the title as pop-up help for the user or in nonvisual presentation
of the form. [ The id attribute, 4.1.1.4 ] [ The title attribute, 4.1.1.5 ]
9.9.2. The event Attributes
Like most other elements, most of the form controls support a number
of user mouse and keyboard event-related attributes that the HTML
4/XHTML-compliant browser recognizes and lets you specially process
using JavaScript or a Java applet, for example. We describe the majority
of these events in detail in Chapter 12 .
9.9.3. The style, class, lang, and dir Attributes
The style attribute for the various form controls creates an inline style
for the elements enclosed by the tag, overriding any other style rules in
effect. The class attribute lets you format the content according to a pre-
 
Search WWH ::




Custom Search