Attribute | Value | Purpose |
---|---|---|
action | URL or file name/path of server-side processing script | Required; indicates where to send the form information or emailed. |
autocomplete | on off |
HTML5 on attribute; browser will use autocompletion to fill form fields off attribute; browser will not use autocompletion to fill form fields. |
id | Alphanumeric, no spaces; must be unique on each page. | Optional; provides a unique identifier for the form |
method | get post |
get is default value; causes the form data to be appended to the URL and sent to server or address identified in the action. post is more private because the data is not seen in the URL |
name | alphanumeric, no spaces; begins with a letter | Optional; names the form to be easily accessed to verify form data before processing. |
Attribute | Value | Purpose |
---|---|---|
type | text | Configures the text box. |
name | alphanumeric, no spaces, begins with a letter. | Names the form element. Should be unique and usually matches the id. |
id | alphanumeric, no spaces, begins with a letter. | Provides a unique identifier for the form element. |
size | numeric | Configures the width of the text box. If no size is given, the browser default size is used. |
maxlength | numeric | Configures the maximum number of characters accepted. |
value | text or numeric | Displays an initial value in the text box. |
disabled | disabled | Form control is disabled. |
readonly | readonly | Form control is for display only. |
autocomplete | on off |
HTML5 attribute; on attribute is default and uses autocomplete to fill the form element off attribute will not use autocomplete |
autofocus | autofocus | HTML5 attribute; places cursor in the form in the element with autofocus. |
list | Datalist element id value | HTML5 attribute; associates the form control with a datalist element. |
placeholder | text or numeric | HTML5 attribute; shows text in a field until the field is focused upon, then hides the text. |
required | required | HTML5 attribute, browser verifies entry of data before submitting the form. |
accesskey | Keyboard character | Configures a hot key for the form control |
tabindex | numeric | Configures the tab order of the form control. |
Attribute | Value | Usage |
---|---|---|
type | submit reset |
submit creates a submit button reset creates a reset button |
name | alphanumeric, no spaces, begins with a letter | Names the form element. Should be unique and usually matches the id. |
id | alphanumeric, no spaces, begins with a letter. | Provides a unique identifier for the form element. |
value | text or numeric | Displays an initial value in the text box. |
accesskey | Keyboard character | Configures a hot key for the form control |
tabindex | numeric | Configures the tab order of the form control. |
Attribute | Value | Purpose |
---|---|---|
type | checkbox | Configures the check box. |
name | alphanumeric, no spaces, begins with a letter. | Names the form element. Should be unique and usually matches the id. |
id | alphanumeric, no spaces, begins with a letter. | Provides a unique identifier for the form element. |
checked | checked | Configures the check box to be checked as default when checked. |
value | text or numeric | Assigns a value to the check box when the check box is checked. |
disabled | disabled | Form control is disabled. |
autofocus | autofocus | HTML5 attribute; browser places cursor in the form control and sets focus. |
required | required | HTML5 attribute, browser verifies entry of data before submitting the form. |
accesskey | Keyboard character | Configures a hot key for the form control |
tabindex | numeric | Configures the tab order of the form control. |
Attribute | Value | Purpose |
---|---|---|
type | radio | Configures the radio button. |
name | alphanumeric, no spaces, begins with a letter. | Names the form element. Should be unique and usually matches the id. |
id | alphanumeric, no spaces, begins with a letter. | Provides a unique identifier for the form element. |
checked | checked | Configures the radio button to be selected as default when displayed. |
value | text or numeric | Assigns a value to the radio button when the radio button is selected. |
disabled | disabled | Form control is disabled. |
autofocus | autofocus | HTML5 attribute; browser places cursor in the form control and sets focus. |
required | required | HTML5 attribute, browser verifies entry of data before submitting the form. |
accesskey | Keyboard character | Configures a hot key for the form control |
tabindex | numeric | Configures the tab order of the form control. |
Attribute | Value | Purpose |
---|---|---|
type | text | Configures the hidden form element. |
name | alphanumeric, no spaces, begins with a letter. | Names the form element. Should be unique and usually matches the id. |
id | alphanumeric, no spaces, begins with a letter. | Provides a unique identifier for the form element. |
value | text or numeric | Displays an initial value in the text box. |
disabled | disabled | Form control is disabled. |
Attribute | Value | Purpose |
---|---|---|
type | text | Configures the password box. |
name | alphanumeric, no spaces, begins with a letter. | Names the form element. Should be unique and usually matches the id. |
id | alphanumeric, no spaces, begins with a letter. | Provides a unique identifier for the form element. |
size | numeric | Configures the width of the password box. If no size is given, the browser default size is used. |
maxlength | numeric | Configures the maximum number of characters accepted. |
value | text or numeric | Displays an initial value in the password box. |
disabled | disabled | Form control is disabled. |
readonly | readonly | Form control is for display only. |
autocomplete | on off |
HTML5 attribute; on attribute is default and uses autocomplete to fill the form element off attribute will not use autocomplete |
autofocus | autofocus | HTML5 attribute; places cursor in the form in the element with autofocus. |
placeholder | text or numeric | HTML5 attribute; shows asterisks in a field until the field is focused upon, then hides the text. |
required | required | HTML5 attribute, browser verifies entry of data before submitting the form. |
accesskey | Keyboard character | Configures a hot key for the form control |
tabindex | numeric | Configures the tab order of the form control. |
Attribute | Value | Purpose |
---|---|---|
name | alphanumeric, no spaces, begins with a letter. | Names the form element. Should be unique and usually matches the id. |
id | alphanumeric, no spaces, begins with a letter. | Provides a unique identifier for the form element. |
cols | numeric | Required; configures the width (by character) of the scrolling text box. If not used, the browser default width is used. |
rows | numeric | Required; configures the height (by character) of the scrolling text box. If not used, the browser default width is used. |
maxlength | numeric | Configures the maximum number of characters accepted. |
disabled | disabled | Form control is disabled. |
readonly | readonly | Form control is for display only. |
autofocus | autofocus | HTML5 attribute; browser places cursor in the form control and sets the focus. |
placeholder | text or numeric | HTML5 attribute; shows asterisks in a field until the field is focused upon, then hides the text. |
required | required | HTML5 attribute, browser verifies entry of data before submitting the form. |
wrap | hard or soft | HTML5 attribute; configures line breaks within the information entered. |
accesskey | Keyboard character | Configures a hot key for the form control |
tabindex | numeric | Configures the tab order of the form control. |
Attribute | Value | Usage |
---|---|---|
name | alphanumeric, no spaces, begins with a letter | Names the form element. Should be unique and usually matches the id. |
id | alphanumeric, no spaces, begins with a letter. | Provides a unique identifier for the form element. |
size | text or numeric | Configures the number of choices the browser will display. If the number of elements is greater than the size, then a scroll bar appears. |
multiple | multiple | Configures a select list to accept more than one choice. |
disabled | disabled | Form control is disabled. |
tabindex | numeric | Configures the tab order of the form control. |
Attribute | Value | Usage |
---|---|---|
value | text or numeric characters | Assigns a value to the option; this value can be accessed by client-side and by server-side processing. |
selected | selected | Configures an option to be initially selected when displayed by a browser. |
disabled | disabled | Form control is disabled. |
Attribute | Value | Usage |
---|---|---|
date | a date | Names the form element. Should be unique and usually matches the id. |
datetime | a date and time (offset from UTC time) | Provides a unique identifier for the form element. |
datetime-local | a date and time without time zone information | Configures the number of choices the browser will display. If the number of elements is greater than the size, then a scroll bar appears. |
time | a time without time zone information | Configures a select list to accept more than one choice. |
month | a year and month | Form control is disabled. |
week | a year and week | Configures the tab order of the form control. |