/ / What is HTML input type?

What is HTML input type?

If you have never encountered a languagemarkup, you hardly understand what the HTML input type is. Those who work with HTML, these explanations to anything. But for beginners who are just learning this language, it will be useful to get acquainted with one of the attributes.

html input type

Language

What is this HTML and who needs it? He first became known in 1993. It is a standardized tool, conditionally - for creating documents on the Internet. In order not to delve into the uneasy terminology of programmers, you can explain this all easier. Most of the web pages that you see on the network consist of commands and codes. All of them make up this language.

The main application that plays HTML,is seen browser. It is for him and adapted all the teams. He interprets all the results that can be written in the usual "Notepad", in the formatted text on the screen.

Structure

In order not to be lost in the entire text array,which is written in the markup language, and find there the necessary attributes of the HTML - input type, the document is structured. It consists of elements that are enclosed in tags.

html form input type

These are special labels, endowed with the properties of the text,enclosed in the tag. For example, you need to make a paragraph. You take a piece of text to separate it, enclose it in <p> and <p /> tags. The slash marks (/) usually terminate the command and are called closing. There are tags that do not require closing. For example, <br> is a label that creates a line break.

In the structure of a document written in HTML,Constant elements are traced. Some are considered compulsory, others can be dispensed with. In general, you can select hyperlinks, text blocks, word processing, the existence of lists, objects, pictures, maps, tablets, symbols and forms. The last element will be discussed in more detail.

The form

To find the HTML input type attribute, you needto study the concept of "form". One of the definitions indicates that this is an element that helps the user enter information on the site for later processing. To explain it easier, you need to remember the web page. You probably saw on the sites different elements in the interface, which are represented by fields for text input, buttons, switches and flags.

Forms are tools for the user. They allow the visitor to search for information on the site, leave comments, participate in surveys, etc. To activate any of the proposed forms on the page, you need to use the <form> tag.

Feedback

To make forms, you can use one of the following:most common <input> tags. It is responsible for the elements with which visitors are working. So, thanks to this label, you can use special text fields, buttons, switches, checkboxes, etc.

html input type hidden

If you do not need to collect and analyzeinformation, then this tag does not need to be inside <form>. But if you want the materials left by the visitor to be sent to the server and then analyzed, then the form label is required.

Diversity

Now we go directly to the attributeHTML input. Type is an attribute that indicates the type of the element. In this case, it is completely different. It becomes a text field, a password field, etc. The attribute is multifunctional and can give the user the ability to quickly clear a form filled with an incorrect form, or attach a file.

Values

There are a dozen values ​​for the HTML input attributetype. Text creates a "frame" on the page to enter information. It can be used for different purposes: searching for materials on the page, entering personal data, etc. A similar field is specified by the value of password. Externally it looks like a text, but all the information that is entered there is indicated by "asterisks". This option is often used so that others can not find out which password you enter.

There are two more similar values ​​for the type attribute: checkbox and radio. The first option is a check box. If you need to make a poll on the site, the checkbox is converted into a check box. And you need to choose several options. The second option is created for the same purpose, but is called a "switch". Allows you to use one answer option.

html input type text

Many have attributes that mimic buttons inHTML. Input type submit creates a popular button, thanks to which you can send the input data to the server. There is a similar one, called image. It does the same, but it looks like a picture, so as not to look static. There is just a button with a value of button.

As mentioned earlier, thanks to the <input> You can create items to upload files or images. To do this, use the value for the type-file attribute. You probably saw a similar element on the web page. Especially where you can upload files.

The last value for HTML input type is hidden. With it, a hidden field can appear on the web page. It does not appear for the user, but helps the developer. For example, if you need to transfer information to the server that was created by him earlier. So there are some tags that are visible only in the file with the code. Also, due to this value, the hidden data is formed for php or js.

Other attributes

In HTML, the form <input> type is not the onlyattribute. A whole list can be found in any electronic textbook on learning the markup language. For example, you can use align, with which you can determine the alignment of the image. This attribute works not only with forms. It can be used, for example, if you have added a map with your location to the site, but you want to place it in a different way. Then you can give this attribute a value of middle, top, left, etc.

html input type submit submit

To assign an alternative to a buttontext, use the alt attribute. In general, an alternative text is necessary for force majeure. Suppose a user has problems with an Internet connection, and the content on the web page is slowly loaded. Due to the fact that the button is represented by a certain image, it may not be downloaded at all. In its place will be an alternative text that you specify. So the visitor can easily find it, even if the pikcha itself does not appear.

The list attribute can help with compiling a listoptions. If the user enters data into the text field, a small list of words suitable for him may appear. You can block access and change an item using the disabled attribute. Such attributes are more than 30. They enable the programmer to correct the work of such elements, set them the value, type, form, etc.

conclusions

In general, to know all the elements, tags, attributes and theirvalues ​​is not easy. Especially if you are just getting started with HTML. Those who work with this language for at least a couple of years can easily operate with most of these codes. But newcomers are better to use additional information. There are many tutorials that explain the meaning of each element.

Read more: