HTML Input Element

The HTML input tag is used to collect information from the user. With the exception of the textarea tag, all elements that require user interaction inside a form will be input's. 

Input tags can be of several types:

  • text: creates a one line textbox. 
  • password: similarly to text, creates a one line textbox where the input is obscured by dummy characters (a dot or an asterisc).
  • radio: allows the user to select one -- and only one -- option from a set of given alternatives
  • checkbox: allows your visitor to select multiple items from a list of alternatives
  • submit: submits the form to be processed by the URL in the action attribute
  • reset: resets the form back to the initial values
  • button: a plain button that can be programmed to do various tasks with JavaScript or on the server side.

HTML Example:

Enter your first name:
Choose a password:
Do you like DesignCourse? Of course! Nope :-(
Which one of these do you own? Check all that apply: Cell phone Desktop computer Notebook

Result:

Enter your first name:
Choose a password:
Do you like DesignCourse? Of course! Nope :-(
Which one of these do you own? Check all that apply: Cell phone Desktop computer Notebook

 

Share

Learn how to design amazing websites