Form elements in HTML

Form elements in HTML
 
Form elements in HTML
  • Currently 0 out of 5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Rating: 0/5 (0 votes cast)

Thank you for rating!

You have already rated this page, you can only rate it once!

Your rating has been changed, thanks for rating!

Log in or create a user account to rate this page.


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:

  • off - disables line break;
  • virtuals - displays line break, but sends the text as it is;
  • physical - line breaks are placed where indicated, then this text is sent.

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).


 

Read also

Adding a form to a page in HTML

Adding a form to a page in HTML

Text field in HTML

Text field in HTML

Buttons in HTML

Buttons in HTML

Checkboxes in HTML

Checkboxes in HTML

Post comment

basicuse.net
html5_css
106160485398655174790

Quick navigation

General navigation