ExpertRating - Online Certification and Employment Testing ExpertRating - Online Certification and Employment Testing ExpertRating - Online Certification and Employment Testing

ExpertRating Home
ExpertRating Benefits
Recommend ExpertRating
Suggest More Tests
Privacy Policy
HTML Tutorial - Index
HTML Tutorial - Introduction
HTML Tutorial - Formatting
HTML Tutorial - Links
HTML Tutorial - Images
HTML Tutorial - Forms
HTML Tutorial - Tables
HTML Tutorial - Frames
HTML Tutorial - Style Sheets
HTML Tutorial - Advance Tags

Online Personal Trainer Certification
Personal Trainer Certification (Spanish)
Six Sigma Certification
Find a Personal Trainer
Project Management Certification
Six Sigma Certification
Six Sigma Black Belt Certification
Master Black Belt Certification
Six Sigma Green Belt Certification
Life Coach Certification
Lean Management Certification
Lean Six Sigma Certification
First Aid Certification
CPR Certification
Yoga Certification
Aerobics Certification
Pilates Certification
Business Analyst Certification
SEO Certification
Online Business Writing Course & Certification
Makeup Artist Certification
Baby Sitting Course & Certification
Time Management Certification
Health Club Management Certification
Medical Coding Certification
Medical Billing Certification
Business Analysis Course
Master Trainer Certification
Total Quality Management Certification
Kaizen Certification
Creative Writing Certification
Event Management Certification
Test Search by Job Title
Administrative Assistant Certification
Virtual Assistant Certification
  All Online Courses


  Home > Courses, Tutorials & eBooks > HTML Tutorial > Forms
Previous Next

HTML Tutorial - Forms

                                                                                                                     Page 1 of 3


Opening an e-mail account on any site is preceded by filling up an e-form by the user. This form asks the user’s personal details along with the desired username and password. This form consists of various input boxes, buttons, labels and option buttons. This is followed by a display of the rules and regulations, in other words; the dos and don’ts of using the e-mail account. An acceptance of this by clicking on the ‘I Agree’ button fulfils all formalities of opening the e-mail account.

There can be various kinds of forms besides an e-mail form in a web page. Forms make a web page interactive. They are displayed by using various form elements like input boxes, buttons and labels. HTML enables users to create forms with the help of these elements.

The following section involves in the creation and customization of forms:

Form Tag

Forms are the most popular way to make a web page interactive. The form tag creates a form to be input by the user. It can contain text fields, check boxes, radio buttons and more. Like any form on paper, a form on a web page allows the user to enter requested information and submit it for processing. It passes the user data to a specified URL.


<form attributes></form>


Attributes of Form Tag


The name attribute takes up the value form name. It defines a unique name for the form. It is an optional attribute.


<form name=”registration”> </form>



The action attribute takes up a URL as its value. It sends the data to the URL defined in action when the submit button is pressed. It is an essential attribute.


<form action=””> </form>


Input Tag

The <input> tag defines the start of an input field where the user can enter his data. The input tag is closed by a backslash (/) at the completion of the tag.


<input attributes />


Attributes of Input Tag


This attribute indicates the type of the input element. The default value is “text.”

The various values of type attributes are:


A button is an input type that will not function without applying some extra code along with it. As button is used while scripting, the concept of buttons will be discussed in detail later.


The checkbox value creates a checkbox which can either be on or off.


Finance: <input type=checkbox />



The Hidden value indicates that the field is hidden. It gives the user the option of hiding the value within it. Hidden is commonly used by programmers who do not want users to see the value typed. The hidden value is still submitted with other information when the submit button is clicked. It usually contains the page name and page number that the user is on.


This is hidden: <input type=hidden />



Image creates an image that is also a “submit” button. When the user clicks on the image, the form is submitted. It also requires the “src” attribute like the image tag.


<input type=image src=”” />



Password indicates that the field is used for typing a password. Password works just like the text type field, with the difference that whatever is typed is not displayed on the screen. Instead of showing what has been typed, the browser displays a series of asterisks (*), bullets (.), or some other symbol to indicate the typed but hidden values.


Password: <input type=password />



Radio is used to create a series of choices out of which only one can be selected. Selecting a radio button option automatically deselects all other options. Several HTML radio buttons are created by using the same name but different values.


<input type=radio name=”joke” value=”a”/> cricket jokes <br/>
<input type=radio name=”joke” value=”b”/> crazy jokes <br/>

<input type=radio name=”joke” value=”c”/> nice jokes <br/>



The reset value resets the form to present it in its original form i.e. in the way before anything was typed on it.


<input type=reset />



The submit value creates the submit button which submits the form to the server. There can be two submit buttons on a form. To do this, the submit button has to be given the same name but different values.


<input type=submit value=”send it” />



Text creates the text entry field, which is the most popular type of data entry field. Text is the default-input type. If the text field is required there is no need to specify the type.


Enter your name: <input type=text />



The name attribute assigns a name to the input field. It is required in most circumstances. The name of the input field is used to send the information to the server.


First Name: <input type=text name=”realname” />



Value sets the value for the input field. This sets the default value for text and password fields, the button text in submit and reset buttons, and the values of choices in radio buttons.


<input type=submit value=”send this” />




Home  |  About Us  |  Privacy Policy  |  Site Map  |  FAQs  |  Contact Us
© ExpertRating 2015. All Rights Reserved.