1
0
mirror of https://github.com/onkelbeh/cheatsheets.git synced 2025-10-16 15:38:44 +02:00
cheatsheets/html-input.md
Rico Sta. Cruz 511de900ba
Formatting updates (#2133)
- Update some sheets which have very long sections
- Remove `layout: 2017/sheet` (everything has the same layout now)
- Remove outdated sheets
2024-04-03 18:30:24 +11:00

1.6 KiB

title, category, updated, weight
title category updated weight
Input tag HTML 2017-10-30 -3

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