elibraryportal Logo

HTML Input Tag

HTML <input> tag can be specified using where a user can enter data. The input tag is used within <form> element to declare input controls that allow users to input data. Where an input field can be various types of attribute type.

Syntax:-

Attributes:

  • type:
  • value:
  • placeholder
  • name:
  • alt:
  • autofocus:
  • checked:
  • disabled:
  • form:
  • max :
  • required:
  • readonly:
  • accept:
  • align:
  • autocomplete:
  • dirname:
  • formaction:
  • formenctype:
  • formmethod:
  • formnovalidate:
  • formtarget :
  • height:
  • list:
  • maxlength:
  • min:
  • multiple:
  • pattern:
  • size:
  • src:
  • step:
  • width:

HTML Input Types Use

Here are the different input types you can use in HTML:

  • <input type="button">
  • <input type="checkbox">
  • <input type="color">
  • <input type="date">
  • <input type="datetime-local">
  • <input type="email">
  • <input type="file">
  • <input type="hidden">
  • <input type="image">
  • <input type="month">
  • <input type="number">
  • <input type="password">
  • <input type="radio">
  • <input type="range">
  • <input type="reset">
  • <input type="search">
  • <input type="submit">
  • <input type="tel">
  • <input type="text">
  • <input type="time">
  • <input type="url">
  • <input type="week">

Example:-

Output:






Next Topic Html Label Tag