HTML and CSS Reference
• formnovalidate : This can be applied to a submit button in order to disable validation. In
addition, the novalidate attribute can be applied to the form to achieve the same result.
The validation of form elements will be introduced in later chapters.
A number of other attributes have been added to provide commonly requested functional-
• placeholder : This provides a greyed out placeholder in an input field. This can be used
to provide context to a user, and act as a hint to the purpose of a field.
• autocomplete : When autocomplete is added, the browser will suggest values to the user
as they type.
• autofocus : This can be used to automatically give a particular field focus when the docu-
• form : it is possible to denote an input field as part of a form even when it is not nested
inside the form. This also allows an input field to be included in multiple forms.
• formaction : It is possible to provide a formaction attribute on a submit button to override
the action set on the form itself. This is particularly useful when there are multiple submit
buttons in the same form. The attribute formenctype can be used in conjunction with this
to override the content type (enctype) set on the form itself, and formmethod can be used
to override the form's default method (e.g. POST).
• step : This can be used on number , date or range input fields. The intention is that the
input field will provide up and down arrows, and pressing this will increment or decrement
the current value by the step amount.