type Attribute


 

Where to use the type Attribute

  • As Type Enumeration (submit | button | reset) - default="submit":
    type is declared on the element: button
  • As Type Enumeration (text | password | checkbox | radio | file | hidden | image | button | submit | reset) - default="text":
    type is declared on the element: input
  • As Type ContentType - #REQUIRED:
    type is declared on the elements: style, script
  • As Type ContentType:
    type is declared on the elements: link, a, object, param

Description

The type attribute may be used on form controls (input and button) to specify the type of control or button to be created.

In other contexts, the type attribute is used to specify a ContentType. For example, on a hyperlink (a or link), the type attribute may be used to indicate the MIME type of the target resource. On a style or script element, it is #REQUIRED and should specify the MIME type of the style sheet or scripting language, respectively. For an object element, the type attribute specifies the MIME type of the object's data and, for a param element, it specifies the MIME type of the run-time resource (when valuetype="ref").


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) > type Attribute (XHTML 1.1)