label Attribute


 

Where to use the label Attribute

  • As Type Text - #REQUIRED:
    label is declared on the element: optgroup
  • As Type Text:
    label is declared on the element: option

Description

The label attribute is #REQUIRED on optgroup elements and optional on option elements.

On an optgroup element it provides a label for the option group to be rendered within the select list.

On an option element it may be used to specify a short label for the option, to be used by the user agent instead of the contents of the option element. However, this functionality is inconsistently supported - Opera, for example, renders the label attribute's contents, whereas Firefox does not.
The label attribute is not present in the *W3C XHTML 1.1 Basic Forms Module.


Page Footer & Copyright

Copyright © Sally Maughan 2005-2009 (Page last updated on 16 May 2009)

*Valid XHTML 1.1 - hosted by *Openstrike

Content based on the W3C Working Draft: *XHTML 1.1 and Recommendation: *XHTML Modularisation 1.1.

W3C, XHTML, XML, HTML, CSS and MathML are *Trademarks of the W3C (*MIT, *ERCIM, *Keio) with which the site's author has no connection.


Up, Next & Previous Links

Your Location

Home > XHTML 1.1 Home > XHTML 1.1 Indexes > Attribute Index (XHTML 1.1) > label Attribute (XHTML 1.1)