HTML Input Types

  • Different HTML input types are used in HTML. These include:

    Input Type Text

    The input type text is used to get data in a single line.

    HTML

    Input Type Password

    It is used to add a password field. The characters used by the user to set the password are displayed as circles or asterisks instead of letters.

    HTML

    Input Type Email

    It adds fields to the HTML form to receive the input as an email address.

    HTML

    Input Type Number

    This HTML input type adds a numeric input field to the form. Developers can also restrict the number usage in this field.

    HTML

    Input Type Tel

    It defines a field in an HTML form that can accept input as a telephone number.

    HTML

    Input Type Checkbox

    This HTML input type defines a checkbox. A user can select one or more than one option within the limited number of choices available for checkboxes.

    HTML

    Input Type Radio

    It is used to add a radio button, and these buttons only have a few choices to select from.

    HTML

    Input Type Button

    It can be used to define any button within the HTML form.

    HTML

    Input Type Submit

    This button is used to submit form input data to a form handler. The form handler is a server page that processes input data.

    HTML

    Input Type Date

    The <input type=’date’> element is used to add or define fields containing the date in an HTML form.

    HTML

    Input Type Datetime-local

    This input type is used to specify the date and time field without any time zone in the HTML form.

    HTML

    Input Type Month

    Similar to the input type date, it defines the month and year fields in the form and provides several options for the user to select their response.

    HTML

    Input Type Week

    This input type specifies a field where users select a week and year.

    HTML

    Input Type Time

    This input type is used to add a field from where a user can select a time.

    HTML

    Input Type Image

    This HTML input type allows to define and use an image as a submit button for the form.

    HTML

    Input Type File

    It is used to upload a file. It gives options like “select file” or “browse” to upload a file.

    HTML

    Input Type Hidden

    It is used when a field needs to be hidden from the end user. Developers usually use it to add or modify data as needed.

    HTML

    Input Type Color

    It defines a field that contains a color.

    HTML

    Input Type Range

    The input type range is used to define “min” and “max” attributes in a field. It controls what numbers can be added to the specified field.

    HTML

    Input Type Search

    Input type search defines a search field in the form. It is like a search bar that you use to search data by putting text in the given field.

    HTML

    Input Type Reset

    To undo all the actions or to reset all the values, input type reset is used.

    HTML

    Input Type URL

    The input type URL is used to define a field that contains a URL address.

    HTML
  • Watch Video on YouTube

    HTML Input Types

  • HTML
    CSS
    JS
  • Ad #1
    Ad #2
    Scroll to Top