Basic HTML Tutorial : Create Website Form Action Using Form Tag, Input, Label, Select, Option And Type Attribute

Share:

Basic HTML Tutorial : Create Website Form Action Using Form Tag, Input, Label, Select, Option And Type Attribute. HTML form are the most important tag in HTML programming, especially in the manufacture of a web-based application. Provide input form property consisting of various types, such as textbox, checkbox, radio button, and submit button.
Basic HTML Tutorial : Create Website Form Action Using Form Tag, Input, Label, Select, Option And Type AtributeIn essence, a form used to collect data from a website visitor. Starting from the form to login, contact form, registration form for the user, advertiser form, even for a website application that can transmit data between web pages.

Basic HTML Tutorial : Create Website Form Action Using Form Tag, Input, Label, Select, Option And Type Attribute

In this tutorial, we will try to explore the basic html form and some of the use of elements and attributes. Immediately, continue reading basic HTML tutorial below :

Form Structure
To create a form, you have to create the form tag as below :

<form action="login.php" method="post">
......
</form>

Two attributes that are used are the action and method. Analogous action is something that operates on the function of the form. While the method is the way to collect every piece of data needed to be processed. Action serves to explain the location data obtained form will be sent. Usually the value of the action attribute is the address of a PHP page that will process the form data content. While the function of the method, is to explain how the data entry form will be sent. The value of the method attribute can either get or post.

The difference, if we fill method attribute to get the form field will be shown in the browser URL. The get method is usually used for search queries. Post method usually used for more sensitive data such as passwords that contain, or user registration. Results form the data will not be visible in the browser.

Form Element
In an HTML form elements and attributes provided some form as below …
Input Tag
Input tag is used to obtain the data that has been filled
The HTML code is :

<input .....>
Or
<input ..... />

Textarea Tag
Normally this tag is used to create a text box, is more widely used to make a contact form, comment form and the like.

<textarea   ....> </textarea>

Select Tag
Sometimes, we will need someone who is in the form of data options like choosing the gender, country, job, payment. Which, the choices we have set. Writing select tag will be as under :

   <select  ...>
        <option value="1">Choise 1</option>
        <option value="2">Choise 2</option>
        <option value="3">Choise 3</option>
   </select>

Note, every option put in the option tag and add the value attribute. Name of the attribute value does not have to be a number but also alphabet.

Form Attribut
To meet your needs such as creating a password boxes, check boxes inside a html form or to process we will need the following attributes are written in the form tag and the tag element.
Type
If you make an input tag, there are several attributes that you can choose the type of which is
Checkbox: to create a check box in the website form.
Radio: to create a selection box, the same function like select tag.
Text: to make the text box.
Password: specifically to make a password box on an html form.
Submit: to submit the form.
Reset: used to reset all the forms that have been filled boxes.
The HTML code as the example below :

<input type="checkbox"/>
<input type="radio"/>
<input type="password"/>
<input type="text">
<input type="submit"/>
<input type="reset"/>

Name
The name attribute is one of the most important attributes in the html form. In all form element must be added the name attribute in it because to process the input from the form will be obtained based on the name attribute. The writing code like this: name="password". Complete, for example, would be like this :

<input name="password" type="password">

Value
Value is an request attribute that will be processed directly used to select options such as, select option, input submit type atau input radio type. For example :

<input type="submit" value="Sign Up"/>

As an example of the use of this website you can see form the tutorial create a contact form, create a login form and the latest one is the form validation.

Have you learned. If there is a problem you can submit comments through the form provided below …
Thanks for Basic HTML Tutorial : Create Website Form Action Using Form Tag, Input, Label, Select, Option And Type Attribute

[Tutorial.World.Edu]

One thought on “Basic HTML Tutorial : Create Website Form Action Using Form Tag, Input, Label, Select, Option And Type Attribute

Leave a Reply

Your email address will not be published. Required fields are marked *