Menu

gitpiper

Input tag Cheat Sheet in April 2024

Last Updated: 30 March 2024

README.md

Input

 <input ...
   disabled
   required
   checked
   autofocus
   autocomplete='off'        <!-- autocomplete -->
   autocompletetype='cc-exp'
   autocapitalize='off'      <!-- for mobiles -->
   pattern='\d*'             <!-- force numeric input in iOS -->

Input types

Text

  • email
  • hidden
  • password
  • tel
  • text
  • search
    {: .-four-column}

Time

  • date
  • time
    {: .-four-column}

Time (not widely supported)

  • month
  • week
  • datetime
  • datetime-local
    {: .-four-column}

Etc

  • file
  • radio
  • checkbox
    {: .-four-column}

Buttons

  • button
  • reset
  • submit
  • image
    {: .-four-column}

Numeric

  • number
  • range
    {: .-four-column}

Examples

Dates

Type Example
type='date'
type='time'

Datetime

Type Example
type='datetime'
type='datetime-local'

datetime and datetime-local fields are not widely supported.

Numbers

Type Example
type='number'
type='range'

Text

Type Example
type='text'
type='password'
type='search'
type='tel'

Also see


338+ more cheat sheets for you in April 2024

Subscribe to our Newsletter

Subscribe to get resources directly to your inbox. You won't receive any spam! ✌️

© 2024 GitPiper. All rights reserved

Rackpiper Technology Inc

Company

About UsBlogContact

Subscribe to our Newsletter

Subscribe to get resources directly to your inbox. You won't receive any spam! ✌️