CLOSE

Input Tag

The <input> tag is used within <form> tags to create form fields.

<form>
   Your name: <input type="text" name="name"><br>
   <input type="submit" value="Send">
</form>
Expand

Attributes

  • autocomplete - should the input allow autocompletion
    • on
    • off
  • checked - For checkbox and radio input types. Select this input by default when the page loads.
  • disabled - Disable the form field.
  • form - ID of the form the input belongs to.
  • max - Max allowed value for date or number.
  • maxlength - Max allowed characters
  • min - Min allowed value for date or number.
  • name - The name of the input.
  • placeholder - Default text to display in the input. This will disappear when a user clicks into the input.
  • readonly - Users cannot edit the content of the textarea. For read only.
  • required - This field is required before the form submits.
  • type - What type of input is this.
    • button
    • checkbox
    • color
    • date
    • datetime
    • email
    • file
    • hidden
    • image
    • month
    • number
    • password
    • radio
    • range
    • reset
    • search
    • submit
    • tel
    • text
    • time
    • url
    • week
  • value - The value of the input.

Help Us to Help You

This website and it's tutorials are only made possible with your support. Support money goes towards keeping our servers online.

Amount

Link to Us

Spread the word! Let people know about our tutorials by placing links on blogs, websites, forums and other places.

HTML Link

Copyright 2019 Step By Step HTML. All Rights reserved.