HTML Input Attributes

  • Various HTML attributes are used to describe HTML input elements. For example:

    The Value Attribute

    It defines the initial values of an input field.

    HTML

    The Read Only Attribute

    It defines that a specific field is read-only. This field can not be edited or modified.

    HTML

    The Disabled Attribute

    It is used to turn off a specific field in the HTML form. It is unusable and unclickable.

    HTML

    The Size Attribute

    This input attribute is used to define the width of a field.

    HTML

    The Max length Attribute

    This HTML input attribute specifies the maximum length or number of characters that can be added to an input field.

    HTML

    The Min and Max Attributes

    This input attribute specifies the minimum and maximum number of characters or values that can be entered in an input field.

    HTML

    The Multiple Attribute

    The multiple attribute allows a user to add more than one response in a specific input field. It works best with emails and files.

    HTML

    The Pattern Attribute

    This input attribute checks the user’s response when the HTML form is submitted with a regular expression.

    HTML

    The Placeholder Attribute

    The placeholder attribute adds a hint in the input field to let the user know the expected value for that specific field.

    HTML

    The Required Attribute

    It defines those fields that must be filled, and the form should not submitted without filling these out. 

    HTML

    The Step Attribute

    The list attribute is used to add a pre-defined list of options to an input field. It contains limited options from which users can select their response.

    HTML

    The Autofocus Attribute

    It is used to specify a particular field that should be focused automatically when the user loads a page.

    HTML

    The List Attribute

    To add a pre-defined list of options in an input field, the list attribute is used. It contains limited options from which the users can select their response.

    HTML

    Input Type Image

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

    HTML

    The Height and Width Attribute

    This input attribute is used to specify the height and width of an input image.

    HTML

    The Autocomplete Attribute

    It defines whether an HTML form or a specific field should have an autocomplete option ON or OFF. This attribute allows the browser to predict the user’s response.

    HTML
  • Watch Video on YouTube

    HTML Input Attributes

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