ComputersSoftware

Html form - description and application

The html form is a special tool that allows you to make contact between visitors and authors. In the source code of the page, this tag is written as follows:

. In this article we will look at the content of the form, the application and the ways of sending information.

Description

The tag is included in all the html language specifications. At the moment, all modern browsers and platforms support this element. The html form is entirely aimed at exchanging data between users and the server. The simplest example of this element is the completion of the questionnaire. Almost every user has filled in information about himself, for example, when registering. Similar questionnaires are created using the tag. But it's worth noting that this element only sets the boundaries of the form and determines the way the data is sent. And most of the content is set using the tags.

Form Settings

There are 8 special attributes of the tag. One of the most important parameters is the "method". This attribute specifies the method that will be used when submitting the form to the server. It has two meanings: get and post. The choice of the mandrel method depends on the content of the form. The most common value is the value of get. There is an obligatory attribute - "action". Its value should point to the url of the executable application that will process the form. Typically, such a program is on the site server. Without this attribute, the form does not make sense. By the way, you can do without using the application. Sending an html form can happen via email. In this case, you need to make the following entry: action = "mailto: e-mail address". When the user presses the "send" button, a list of tools will appear in front of him, which let you send emails.

Form content

As mentioned above, forms for the html site often contain various questionnaires, registration sheets, surveys, etc. This content is generated using the tag. This element has many different individual settings. The required attribute is "type", which indicates the type of the tag. This element most often generates different fields for data entry. For example: . Such a record will create an area with the ability to insert text. There is a special value for the attribute type = "password", which allows you to safely enter a password or other important information (all characters will be hidden). Most often, the forms have the following two buttons: submit and reset. They are specified as the value of the "type" attribute. The first value means sending the form, the other is resetting. The text inside the buttons can be changed.

additional information

The form html can be made out using CSS. And most often this is how it happens. You can also create a form in the form of a table, then all the content will be aligned at your discretion. You can use this element everywhere. It is not necessary to restrict yourself by applying the form only to fill in the data. The tag can contain an unlimited amount of information and content.

Conclusion

So, today you met the tag. To fully understand its effect, it is necessary to try it in practice. If you do not have a server and a management application, you can use the method to send the form to e-mail. So you understand the basic principle of this element. The html form is used on almost every site where developers want to create communication with their users.

Similar articles

 

 

 

 

Trending Now

 

 

 

 

Newest

Copyright © 2018 en.delachieve.com. Theme powered by WordPress.