enctype Attribute


 

Where to use the enctype Attribute

  • As Type ContentType - default="application/x-www-form-urlencoded":
    enctype is declared on the element: form

Description

For form elements with method="post", the enctype attribute specifies the content type of the submitted data.

The value of the enctype attribute should be either "application/x-www-form-urlencoded" (the default) or "multipart/form-data". Behaviour for other values is unspecified (see - for HTML4 - *HTML 4 - Form content types).

When submitting non-ASCII characters or binary data or when using input type="file" within a form, the form element should be given enctype="multipart/form-data" and method="post".


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