Read HTML The Definitive Guide Online
Authors: Chuck Musciano Bill Kennedy
10.8 General Form Control Attributes
The many form control tags contain common attributes that, like most other HTML 4.0 tags, generally serve to label, set up the display, extend the text language, and make the tag extensible programmatically.
10.8.1 The id and title Attributes
The id attribute, like most other HTML 4.0 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 processed.
The title attribute is similar to id in that it uses a quote-enclosed string value to label the form control. However, it entitles only the form segment; its value cannot be used 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]
10.8.2 The event Attributes
Like most other elements in an HTML 4.0 standard document, most of the form controls support a number of user mouse and keyboard event-related attributes that the HTML 4.0-compliant browser will recognize and let you specially process with an applet, such as a JavaScript program. We describe
the majority of these events in detail in Chapter 13, Executable Content.
10.8.3 The class, style, 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 rule in effect. The class attribute lets you format the content according to a predefined class of the