Skip to main content

How to create HTML Form - I

How to create HTML Form

In this tutorial, we will learn about  How to create HTML Form. So far we have discussed how to create a frametablesList, insert Images, Linking in HTML etc. HTML Form is one of the most important  part of the websites  Every website has Contact forms or feedback forms.. Filling the Digital forms  saves time, cost of printing, and  paperwork  Before learning about how to create a Form lets understand  what is a form?

What is a form?

Dictionary meaning of the form is  a blank document or template to be filled in by the user, in the same way as HTML Forms. HTML Forms are used  to gather/collect information about an user or customer, such as  his or her  e-mail address, name, address, phone, date of birth and, educational qualification etc. 
<form></form> tag is used to create the HTML Form as given below.
<form action="abc.php" method="">
----------
---------
</form>

Attributes of <form> tag
1. Action = "abc.php" -  The action to be performed when the form is submitted.
2. Method="Post" or "Get" -  By default, the method is Get. It is used to display the submitted form data in the address bar of the browser.  If the user changes the method to post then the submitted form data will not appear in the address bar of the browser. It is used to send a large amount of data in one go.

Form Controls

<Input> :
<input> tag is used to create interactive controls using type attributes.
1. <input type="Text">         Text is used to enter single line data. i.e. not more the 255.
2. <input type="radio">        Radio is used to create radio button. It is used to select only one
                                                  option from multiple options.
3. <input type="submit">      Submit button is used to submit the form.
4. <input type ="checkbox"> Checkbox is used to create Checkbox. It is used to select multiple.

 Atributes of <input> tag
  1. Type="radio" / "text"/"checkbox"/"submit" 
  2. Name="name of the element"
  3. Value= "text" - specifies the default value.
  4. Maxlength=value - Specifies the maximum number of characters in the text box.
  5. Size=value - Specifies the width of the text box.
Text in the Form 

Text is used to enter single line data i.e. not more than 255 characters. 

Example:

How to create form- Text
The output is :


how to create a form using text
How to create form - text 

Radio Button in the Form

Radio button  is used to select only one option out of many option. 

Example:


how to create a form
Output is 


How to create form - radio button
Output is :

How to create form - Radio button
Text Area in the Form

Textarea it is used to enter the multi-line text.
Atributes of Textarea:
  1. name="name of the textarea"
  2. rows=value - Numbers of rows.
  3. cols=value -  Numbers of column.
 Example:
how to create form- textarea
To create form using Textarea
       Output is 

How to create form using Textarea




NEXT

Comments

Popular posts from this blog

HTML WEB PAGE DESIGN - How to Create simple HTML web page

How to Design Simple HTML Web page In this article, we are going to learn how to design HTML web page. This article is used to let you know, how to create a simple web page using HTML. With this article you will come to know how to create the simple web page from scratch. To create the web page one should use the editors like notepad or Dreamweaver or Notepad++ etc. Here we are using Notepad ,in this connection steps are initiated to be as following HTML  Web Page Design A web page is a part of a website, containing information about a particular topic. You can create a custom web page using HTML. You can put anything you want on your web page like images, tables, hyperlinks, etc. Open Notepad: To open the Notepad one has to go to Start -> All Programs -> Accessories ->Notepad.  Notepad Once Notepad is open write the coding their as given below 1. <HTML> is the first tag of the web page and you have to write it at the top of the no

How to create HTML Forms - II

How to create HTML Form -  II In this tutorial, we will learn about    How to create HTML Form .  So far we have discussed how to  create a frame ,  tables ,  List , insert  Images ,  Linking in HTML  etc. HTML Form is one of the most important  part of the websites  Every website has Contact forms or feedback forms.. Filling the Digital forms  saves time, cost of printing, and  paperwork. Submit Button Submit button It is used for submitting the form data to the server page. Example: How to create form - Submit button Output is: How to create form- Sumit Button <Select></Select> <select></select>   It is used to create Popup menu and a List.<option></option> is used to define the option in the drop-down menu  or the list. Attributes of <select></select> Name = name - Name of the drop down menu or  list Size= value - To specify the number of visible  values. Selected - To define Pre-selected item. Multi

Basic Formatting Tags of HTML - 2

Subscript the Text  <sub></sub> tag is used to display the text or figure or symbols below the baseline, slightly of small size then normal text. It is used to display mathematical formulas, footnote, end-notes. Example <html> <head> <title> subscript the text </title> </head> <body> H<sub>2</sub>O </html> Larger Text <big></big> tag is used to increase the size of the text by 1 point. Example <html> <head> <title> to increase the size of the text 1 point </title> </head> <body> Education <big>point</big> </body> </html> Smaller Text <small></small> tag is used to decrease the size of the text by one point. Example <html> <head> <title> to decrease the size </title> </head> <body> Education <small>time</small> </body> </html> S