Eksempel
Attributter
- autocomplete: The autocomplete content attribute can be used to hint to the user agent how to, or indeed whether to, provide such a feature. There are two ways this attribute is used. When wearing the autofill expectation mantle, the autocomplete attribute describes what input is expected from users. When wearing the autofill anchor mantle, the autocomplete attribute describes the meaning of the given value.
- list: The list attribute is used to identify an element that lists predefined options suggested to the user.
- min and max: The min and max attributes indicate the allowed range of values for the element.
- readonly: The readonly attribute is a boolean attribute that controls whether or not the user can edit the form control. When specified, the element is not mutable.
- required: The required attribute is a boolean attribute. When specified, the element is required.
- step: The step attribute indicates the granularity that is expected (and required) of the value or values, by limiting the allowed values.
Lista er hentet fra HTML-spesifikasjonen.
Vær oppmerksom på at det er store forskjeller i implementasjon mellom nettlesere, og at ikke alle nettlesere støtter alle attributter. Særlig Safari har dårlig støtte for samtlige attributter.