Form elements in HTML

Form elements are standard input control elements. Input values are then passed to a web server.
Table 1 shows the standard elements with their parameters, and examples.
Table 1. Form elements.
Parameter | Description | Example |
---|---|---|
Text field | ||
size | Field width. |
|
maxlength | Maximum number of characters allowed in the text. |
|
name | Name of the field. Designed for the form handler to be easily identified. |
|
value | Original text contained in the field. |
|
Multi-line input control element | ||
name | Name of the field. |
|
cols | Number of columns. |
|
rows | Number of rows. |
|
wrap | Parameters of line break. Possible values:
|
|
Password | ||
name | Name of the field. |
|
value | Value of the field defines what data will be sent to the server. |
|
Button | ||
name | Name of the field. |
|
value | Value of the field defines what data will be sent to the server. At the same time serves as inscription text. |
|
Submit button | ||
name | Name of the field. |
|
value | Text displayed on the button |
|
Reset button | ||
name | Name of the field. |
|
value | Text displayed on the button. |
|
Checkboxes | ||
name | Name of the field. |
|
value | Value of the field defines what data will be sent to the server if the desired checkbox is checked. |
|
checked | If this parameter is present, then the checkbox will be checked automatically. |
|
Radio buttons | ||
name | Name of the field. |
|
value | Value of the field defines what data will be sent to the server if the desired circle (only one) is picked. |
|
Combo box | ||
Select |
||
name | Name of the field. |
|
size | Number of rows displayed. |
|
multiple | This parameter allows you to select more than rows. |
|
Option |
||
selected | Field displayed by default. |
|
value | Value of the field defines what data will be sent to the server if the desired item from the list is chosen. |
|
Image button | ||
name | Name of th field. |
|
src | URL of the image (path to the graphic file). |