HTML input Tag

HTML input Tag defines an input field inside the form element which can take data input from the users. There are 22 types of input elements, all of them are used to take input from the user.

Syntax of HTML input Tag

The Syntax of HTML input Tag is shown below, It has only starting tag.

<input type="text" id="name" name="uname">

Usage of HTML input Tag

HTML input Tag is used to take the input from the user.

This input from the user can be used to perform a specific task, for example calculation etc.

There are 22 types of input elements. The type of input element is defined using the type attribute.

All types of input element are listed below.

  1. <input type="text">
  2. <input type="password">
  3. <input type="submit">
  4. <input type="button">
  5. <input type="email">
  6. <input type="file">
  7. <input type="number">
  8. <input type="search">
  9. <input type="radio">
  10. <input type="checkbox">
  11. <input type="date">
  12. <input type="hidden">
  13. <input type="tel">
  14. <input type="reset">
  15. <input type="image">
  16. <input type="month">
  17. <input type="color">
  18. <input type="datetime-local">
  19. <input type="time">
  20. <input type="range">
  21. <input type="url">
  22. <input type="week">

HTML input Tag is an inline element.

Example of HTML input Tag

Simple example of HTML input Tag is shown below.

<input type="text" id="name" name="uname">

In above example a text type of input element is used which will take the textual input from the user.

<input type="password" id="pass" name="pass">

In above example a password type of input element is defined which is used to take the password from the user.

The id attribute is used to define a unique id for the input element.

The name attribute specify the name of the input element which is also used to access the value of input element.

Browser Support for HTML input Tag

HTML input Tag is supported by all major browsers including Safari and Internet Explorer.

Global Attributes Support in HTML input Tag

The HTML input Tag supports all Global Attributes.

Event Attributes Support in HTML input Tag

The HTML input Tag supports all Event Attributes.

HTML input Tag Video

Watch our video on HTML input Tag.

HTML anchor Tag HTML abbr Tag HTML acronym Tag HTML address Tag HTML applet Tag HTML area Tag HTML article Tag HTML aside Tag HTML audio Tag HTML b Tag HTML base Tag HTML basefont Tag HTML bdi Tag HTML bdo Tag HTML big Tag HTML blockquote Tag HTML body Tag HTML br Tag HTML Button Tag HTML Canvas Tag HTML Caption Tag HTML Center Tag HTML Cite Tag HTML Code Tag HTML Col Tag HTML colgroup Tag HTML comment Tag HTML data Tag HTML datalist Tag HTML dd Tag HTML del Tag HTML details Tag HTML dfn Tag HTML dialog Tag HTML dir Tag HTML div Tag HTML dl Tag HTML Doctype Tag HTML dt Tag HTML em Tag HTML embed Tag HTML fieldset Tag HTML figcaption Tag HTML figure Tag HTML font Tag HTML footer Tag HTML form Tag HTML frame Tag HTML frameset Tag HTML Heading Tags HTML head Tag HTML header Tag HTML hr Tag HTML html Tag HTML i Tag HTML iframe Tag HTML img Tag HTML input Tag HTML ins Tag HTML kbd Tag HTML label Tag HTML legend Tag HTML li Tag HTML link Tag HTML main Tag HTML map Tag HTML mark Tag HTML meta Tag HTML meter Tag HTML nav Tag HTML noframes Tag HTML noscript Tag HTML object Tag HTML ol Tag HTML optgroup Tag HTML option Tag HTML output Tag HTML p Tag HTML param Tag HTML picture Tag HTML pre Tag HTML progress Tag HTML q Tag HTML rp Tag HTML rt Tag HTML ruby Tag HTML s Tag