HTML FORM Elements/Controls

The <input> Element :

The <input> element is the most commonly used tag within HTML forms. It give you to specify various types of user information fields such as text, checkboxes, radio buttons, Select Lists, Submit etc, depending on the type attribute. For example :

<input type="text">           Defines a one-line text input field
<input type="submit">      Defines a submit button
<input type="password"> Defines a password input field

Some of the main attributes of <input> elements are as follows :

  • type : It indicates the type of input control. The values of type attribute are text, button, password, file, checkbox, radio, reset, submit.
  • value : This can be used to provide an initial value inside the control.
  • name : Used to give a name to the control which is sent to the server to be recognized and get the value.
  • size : Used to specify the width of the text-input control in terms of characters.
  • maxlength : Used to specify the maximum number of characters a user can enter into the text box.

The HTML Form contains special elements like Inputbox, checkbox, radio-buttons, submit buttons etc. These special elements are also known as form controls. Some of them are as follows :

  • Text Input Controls
  • Password Input Controls
  • Multiple-Line Text Input Controls
  • Checkboxes Controls
  • Radio Box Controls
  • Select Box Controls
  • File Select boxes
  • Hidden Controls
  • Clickable Buttons
  • Submit and Reset Button



Next Topic :

No comments:

Post a Comment