Input Type=File
 
Support Key: [2|3|3.2|4] [X1|X1.1] [IE4B2|M|N2|O3.5]
What is it?
Attributes
Tag Example
Parent/Content Model
Tips & Tricks
Browser Peculiarities
= Index DOT Html by Brian Wilson =
Main Index | Element Tree | Element Index | HTML Support History



   Quick Statistics   
End Tag:
   Omitted
Standards Details:
In all HTML 4.x/XHTML DTDs
XHTML Modules:
Forms
CSS 'display' Type:
"inline" (Replaced element)
CSS Mapping:
NA
Default Rendering:
A manual entry textbox and a activate-able widget to display a "File/Find" scheme.
Official Docs:
HTML 4.x, XHTML 1.1

What is it?
FILE is a TYPE attribute value to the INPUT element for FORMs. It allows the user to enter a filename that can be used as input for the form. To allow this, the author must specify a new ENCTYPE attribute value in the FORM element: ENCTYPE="multipart/form-data"

Common Attributes
%Core%
[2|3|3.2|4] [X1|X1.1] [IE4B2|M|N6B1|O4]
%Accessibility%
[2|3|3.2|4] [X1|X1.1] [IE4B1|M|N6|O5]
%Events%
[2|3|3.2|4] [X1|X1.1] [IE4|M|N2|O4]
%Language%
[2|3|3.2|4] [X1|X1.1] [IE4|M|N6B1|O]
%Data%
[2|3|3.2|4] [X1|X1.1] [IE|M|N|O]
%Editing%
[2|3|3.2|4] [X1|X1.1] [IE5.5|M|N|O]

Specific Attributes
Accept
[2|3|3.2|4] [X1|X1.1] [IE|M|N|O]
Standards Details: In all HTML 4.x/XHTML DTDs
Required? No
Description:
This attribute specifies the MIME types that the form processing server and script should correctly handle. A browser may use this information to filter out non-conforming files when prompting a user to select files to upload.
Values: CDATA. [Comma-separated list of MIME types.]
Accesskey
[2|3|3.2|4] [X1|X1.1] [IE4B2|M|N|O7]
Standards Details: In all HTML 4.x/XHTML DTDs
Required? No
Description:
This is a method of giving access/focus to an active HTML element using a keyboard character. This is a common GUI paradigm also known as a "keyboard shortcut" or "keyboard accelerator" A single character is used as the value of this attribute. In addition, a platform-dependent key is usually used in combination with the ACCESSKEY character to access the functionality of the active field.
Values: CDATA. [A single, case-insensitive character from a browser's character set.]
Align
[2|3|3.2|4] [X1|X1.1] [IE|M|N6B1|O]
Standards Details: Deprecated in HTML 4.x/XHTML 1.0. Dropped in XHTML 1.1 in favor of CSS.
Required? No
Description:
This attribute specifies the alignment of text following the INPUT reference relative to the field on screen. LEFT and RIGHT specify floating horizontal alignment of the form field in the browser window, and subsequent text will wrap around the form field. The other options specify vertical alignment of text relative to the form field on the same line.
Values: Left | Right | Top | Texttop | Middle | Absmiddle | Baseline | Bottom | Absbottom
Disabled
[2|3|3.2|4] [X1|X1.1] [IE4B2|M|N6B1|O7]
Standards Details: In all HTML 4.x/XHTML DTDs
Required? No
Description:
This is a stand-alone attribute which indicates the element is initially non-functional. Disabled form elements should not be submitted to the form processing script.
Values: NA (HTML); disabled (XHTML)
Maxlength
[2|3|3.2|4] [X1|X1.1] [IE4|M|N2-4.x|O]
Standards Details: In all HTML 4.x/XHTML DTDs
Required? No
Description:
This optional attribute constrains the number of characters that can be entered into the filename entry field by the user. If the MAXLENGTH attribute is larger than the optional SIZE attribute, the filename entry field should scroll as necessary.
Values: Positive integers.
Name
[2|3|3.2|4] [X1|X1.1] [IE4B2|M|N2|O3.5]
Standards Details: In all HTML 4.x/XHTML DTDs
Required? Yes
Description:
This is a required attribute that associates a symbolic name to the field for submittal to the form processing script.
Values: CDATA
Readonly
[2|3|3.2|4] [X1|X1.1] [IE4B2|M|N|O7]
Standards Details: In all HTML 4.x/XHTML DTDs
Required? No
Description:
This is a stand-alone attribute which tells the browser that content in the field may not be modified by the reader.
Values: NA (HTML); readonly (XHTML)
Size
[2|3|3.2|4] [X1|X1.1] [IE4|M|N2|O6]
Standards Details: In all HTML 4.x/XHTML DTDs
Required? No
Description:
This attribute controls the amount of display space allocated to the filename entry field.
Values: CDATA. [Positive integers.]
Tabindex
[2|3|3.2|4] [X1|X1.1] [IE4B2|M|N6.1|O7]
Standards Details: In all HTML 4.x/XHTML DTDs
Required? No
Description:
"Tabbing" is a method of giving access/focus to an active HTML element using a standard keyboard sequence. All the active elements in a document can be cycled through using this sequence (ex: Windows TAB key.) The order of the active elements in this cycle is usually the order they occur in the document, but the TABINDEX attribute allows a different order to be established. The use of this attribute should create the following tabbing order cycle if the browser supports the attribute:
  1. Active elements using the TABINDEX attribute with positive integers are navigated first. Low values are navigated first.
  2. Active elements not specifying any TABINDEX attribute
Those elements carrying a DISABLED attribute or using negative TABINDEX values do not participate in the tabbing cycle.
Values: Positive or negative integers.
Type
[2|3|3.2|4] [X1|X1.1] [IE4B2|M|N2|O3.5]
Standards Details: In all HTML 4.x/XHTML DTDs
Required? Yes*
Description:
* This is the required TYPE attribute for this INPUT mechanism. From the strict view, the TYPE attribute is not required.
Values: FILE
Value
[2|3|3.2|4] [X1|X1.1] [IE|M|N|O]
Standards Details: In all HTML 4.x/XHTML DTDs
Required? No
Description:
This attribute gives the path to the file to be uploaded.
Values: CDATA. [Either an absolute or relative URL. All URLs should be URL encoded where required.]
Example
<form method="post" action="action.cgi"
           enctype="multipart/form-data">
   <input type="file" name="filename" />
</form>
Parent Model
%In-line Parent% | %Block Parent%
Content Model
This element does not accept any content.
Tips & Tricks Browser Peculiarities
Boring Copyright Stuff...