HTML/Attribute/type (input)

Aus SELFHTML-Wiki
Wechseln zu: Navigation, Suche

Das type-Attribut legt den Typ eines input-Elements fest.

erlaubte Werte

button, checkbox, color, date, datetime-local, email, file, hidden, image, month, number, password, radio, range, reset, search, submit, tel, text, time, url, week

default-Wert text
erlaubt in input
Browsersupport Details bei caniuse.com: {{{caniuse}}}
Beispiel
<input type="number" min="100" max="220">
Das Eingabefeld nimmt nur Zahlen an.
Beachten Sie: Die Browserunterstützung ist bei neueren Typen sehr unterschiedlich.

Siehe auch

Weblinks

W3C: of the type attribute