• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Chapter 15. Forms > New Form Attributes in HTML 4.01

15.5. New Form Attributes in HTML 4.01

The HTML 4.01 specification introduced a number of new attributes that make form elements more accessible and easier to use. As of this writing, they are still poorly supported by most browsers, but they do reveal the W3C's thinking regarding forms. Some attributes take into account efforts to improve accessibility and internationalization. Some can be used with Dynamic HTML to make form elements turn on and off, or become hidden or visible based on user input. Table 15-1 lists the new attributes along with the form elements to which they can be applied.

Table 15-1. New form attributes in HTML 4.0
Attribute Description Related tag(s)
accept-charset Specifies the list of character encodings (character sets) that must be accepted by the server processing the form. This attribute is part of the W3C's internationalization efforts requiring alternative character sets to represent non-western writing systems. (This attribute is not widely supported.) <FORM>
accesskey Assigns an access key (keyboard shortcut) to an element for quicker access. <BUTTON>, <INPUT>, <LABEL>, <LEGEND>, <TEXTAREA>
disabled Disables the control for user input. It can only be altered via a script. Browsers may display disabled controls differently (grayed out, for example), which could be useful for dimming certain controls until required info is supplied. <BUTTON>, <INPUT>, <OPTGROUP>, <OPTION>, <SELECT>, <TEXTAREA>
readonly Prevents the user from changing the text in a field. <INPUT type=text>, <INPUT type=password>, <TEXTAREA>
tabindex Specifies position in the tabbing order. Tabbing navigation allows the user to cycle through the active fields using the Tab key. <BUTTON>, <INPUT>, <SELECT>, <TEXTAREA>



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint