banner
Welcome to HTML.co.uk, the number one resource for all news, information, and happenings regarding HTML.

Updates: HTML.co.uk has just been relaunched. Subscribe to our RSS Feed to stay on top of HTML news and techniques.
Jul
2nd

Different Controls used in HTML Forms

Author: Editor | Files under HTML Tutorials
Tags for this article: , , , , ,

The end user interacts with the HTML forms via various kinds of controls such as text boxes, command buttons, option lists, checkboxes etc. Each and every option is intended to execute a specific type of command and generates the relevant output. The functions of every control is different form one another. Web developer can use only few of them or all of them depending upon his needs and keeping in mind the ultimate objective of embedding the form in the web site.

Every control is given a name so that the scripts can easily identify it. There are two types of values of the controls. One is the initial value which indicates the default status of the control at the time the form is loaded and the other one is current value which determines the current status of the control. For example: The initial value of a text box is blank, but when the user will enter his name into it its current value will change. These two values are important as they tell the scripts that whether the form has been modified or not. Every time the user resets the form all the control’s values get changed into their initial state.

Different types of controls used in the form are:

• Command Buttons
• Check Boxes
• Radio Buttons
• Drop Down Menus
• Text Boxes
• File Select
• Hidden Controls
• Object Controls

Command Buttons: Command buttons are used when the user wants to submit the information or he wants to reset the values embedded in the form. There are three types of command buttons i.e. submit button, reset button and push button. The submit button is used when the user wants to submit the details entered into the form. Reset button is pressed when the user wants to set all the values to their default state. Apart from these there can be other types of command buttons also which can be used for specific purposes. Those buttons are called push buttons.

Check Boxes: Check boxes are squared shaped boxes which are used to select one or more than one options simultaneously.

Radio Buttons: Radio buttons are circle shaped buttons which unlike the check boxes allow you to select only one option at a time within a given set of alternatives.

Drop Down Menus: These menus are used as alternative to radio buttons and check boxes. If the list of the options is very long, then using check boxes and radio buttons will take large space and the look of the web site will deteriorate. In order to solve this drop down menus is used in which infinite countless number of options can be accommodated without increasing the size of the menu.

Text Boxes: Text box is used to enter some textual data in the form such as your name. Text box cannot contain various lines of text. It is limited to a certain number of characters. If you want to give the user more space to write then the ‘TEXTAREA’ option can be used.

File Select: This control allows the user to select files so that their contents may be submitted with a form.

Hidden Controls: These kinds of controls are not shown to the end user. It is only in the background to facilitate data exchange between the client and the server.

Post a Comment