HTML

Creating forms in HTML (part-8)

Written by Saiful Islam

Importing data

Through collecting data from users we can process in different type of servers and so we need to follow few HTML coding structure so that we can pass those.

The common tag for all HTML data submission form is the <form> tag.

There are five types of data importing forms for gathering those data:

  1. Text Fields:

This form only can import the textual data from the user like username, email ID, address etc. So, the tag we have to use is :

 

Example:

Input

Output

 
E-mail ID:
Username:

 

2.  Password field:

This form is only used to input password type data. So, the tag should be :

 

Example:

Input Output
 
Password:

 

3. Radio Buttons:

In this data importing form we can get only one data from each question. Just like “yes” or “no”. The structure is :

 

Example:

Input Output
 
What do you prefer?
Tea
Coffee

 

4. Checkoxes:

Sometimes we need to input data from our provided options. Here the user can select as much options as he/she likes.

The structure is :

 

Example:

Input Output
What type of service you can provide?HTMLCSSPHP

5. Submit button: This is another type of submission form which is quite similar with textual type submission. But the main difference is the appearance of the “submit” button which is used to send the data to the server. The structure is:

 

Example:

Input Output
 
E-mail ID:

 

Note: action=”html_form_action.asp” is used to return data to the browser from the server so that you can watch the text type element that you have imported. You also can submit pictures and files. I will discuss that later.

Suggestion:
You can provide any name of those input tags like: <input type=”text” name=”human”> or even it can be: name=”HTML”. But remember that the name you provide here should be used as the same whenever you need to identify the specific tag. So, different type of input should have different name/identity.

About the author

Saiful Islam

3 Comments

Leave a Comment