HTML Forms

HTLM form is a tool, enabling webmaster to obtain feedback from the site visitors. Form may contain various fields, defined by the webmaster.
Form elements allow visitor to enter certain information into the form field, which can be represented in a variety of types – a drop-down menu, a text field, a checkbox, a radio button etc..
<form> tag is used to mark forms.
<input> tag is a form tag, which is associated with type attribute, defining input type. There is a range of input types that are used most often. Their brief description is given below.
Text field type is designed for entering information in form of letters or numbers.
Example:
*Important note: the form itself is not displayed. By default, the width of the text field is 20 characters.
Radio buttons are used when it is necessary to give the user a choice from a limited amount of options.
Example:
Checkboxes are used to give a user a list of options to choose from.
Example:
Form action attribute is necessary to define what actions should be performed after submitting the forms. Content of the form is sent to the server, and form action attribute defines the destination folder to send collected data to.
FORM - With the help of the following elements you can create questionnaires and different fields for text inputting with the possibility of subsequent sending the submitted forms to your server.
Elements for form creating:
FORM - creates a form

TEXTAREA - creates a field for inputting a few lines of text
SELECT - creates a menu
OPTION - Creates a separate items of the menu (see SELECT)
INPUT - creates a field in the form

FORM - is used to create a form. It should be the presence of initial and ending tags. Inside the FORM element the use of the majority of HTML-elements is allowed.
NAME - defines the name of the form, unique to this document. Used if there is a few forms in the document.
ACTION - a required attribute. Specifies the URL for sending the form content - the path to the script of the server that acts in current form.
METHOD - defines the way to send the contents of the form. Possible values are GET (default) and POST.
ENCTYPE - defines the method of coding the contents of the form when you send. The default is "application / x-www-form-urlencoded".
TARGET - defines the name of the window, which returns a result of a submitted form. Possible values: _self, _parent, _top, _blank, or clearly specified the name of the window.

1
2
3
4
5
6
7
8
9
10
<HTML> <body>
     <- Creating a form ->
     <FORM ACTION="my.php" METHOD="Post" NAME="Form">
     <! – Inside the form of creating a text box: ->
     Last Name:
     <INPUT TYPE="text" name="myname" SIZE="20" VALUE="VALUE">
     <! – The "Send" button: ->
     <INPUT TYPE="submit" VALUE="Otpravit">
     </ FORM>
</ body> </ HTML>
HTML (HyperText Markup Language) is the predominant markup language for web pages. It helps describe the structure oftext-based information in a document and denotes certain text as links, headings, paragraphs, lists. Besides, it supplements the text with interactive forms, embedded images,
and other objects. HTML is written with "tags", surrounded by angle brackets. HTML also describes, to some extent, the appearance of a document, and can include embedded scripting language code (such as JavaScript) that can affect the behavior of Web browsers and other HTML processors.

HTML markup consists of several key components, including elements (and their attributes), character-based data types, character references and entity references. Another important component is the document type declaration, which specifies the Document Type Definition. Elements are the base for HTML markup. Elements have two main properties: attributes and content. Each attribute and each element's content has certain restrictions that must be followed for a HTML document to be considered valid. As a rule, an element has a
start tag (e.g. ) and an end tag (e.g. </element-name>). The element's attributes are located in the start tag and content is located between the tags (e.g. Content). There are several types of markup elements: structural, presentational and hypertext markup . Structural markup describes the purpose of text. Presentational markup describes the appearance of the text, independently of its function. Hypertext markup links parts of the document to other documents.

Forms are a tool for the webmaster to get information from the user, such as: his name, email address, credit card, etc. They allow the user to enter requested information and submit it for processing. A form takes information from the viewer who may store that data into a file, place an order, gather user statistics, register to the web forum, or maybe subscribe to the weekly newsletter. Forms are the most popular means of making web pages interactive.

HTML form elements, often called “controls” (like text fields, text area fields, drop-down menus, radio buttons,
file, reset, submit button, checkboxes, select box etc.), allow the user to enter data in a form. Users are able to interact with forms through these controls. When the user clicks on the "Submit" button, the input of the form is sent to the server. The form's action attribute gives the name of the file to send the content to. The file defined in the action attribute does something with the received data.

A form is defined with the <form> tag. For example, the

1
<a href="/" title="Html Forms">Html forms</a>

can be used to insert credit card data to order a product or can be used to retrieve data. Besides, HTML forms are applied to query and display existing data in a similar manner to mail merge forms, with the same benefits. The implementation of HTML language often invokes user interface idioms automatically, such as grids and themes, which minimizes programming time, costs and risks.

The most used form tag is the <input> tag. The type of input is specified with the type attribute. A form is defined with the <form> tag. The form itself is not visible.

After the form is submitted, the search words go to a program on the server. The program will search its database for matches. Afterwards, it creates a webpage with the results, which is sent back to the visitor. A typical HTML form example is a search engine.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<form>
     <table>
      <tr>
          <td>First Name: *</td>
          <td><input type="text"></td>
      </tr>
      <tr>
          <td>Last Name: *</td>
          <td><input type="text"></td>
      </tr>
      <tr>
          <td>Email Address: *</td>
          <td><input type="text"></td>
      </tr>
      <tr>
          <td>Upload Image *</td>
          <td><input type="file"></td>
      </tr>
      <tr>
          <td>Description / Comments:</td>
          <td><textarea rows="5"></textarea></td>
      </tr>
          <tr>
          <td colspan="2"></td>
      </tr>
          <tr>
          <td colspan="2"></td>
      </tr>
      <tr>
          <td colspan="2"><input type="button" value="Submit"></td>
      </tr>
     </table>
</form>

Image in HTML page
HTML forms
Web Forms
Form maker