i

Learn HTML and CSS in 10 Days

Form And Input Attributes

To accommodate different types of input, form, and control elements, there are several attributes and corresponding values. They serve different functions, like adding up form validation and disabling controls. Given below are some of the most frequently used attributes.

Disabled

The 'disabled' attribute switches off control or an element such that no interaction is possible. These elements are not going to send any value to the server of the website.

Placeholder

In HTML5 the placeholder attribute offers a tip or hint inside the form control of element as soon as theya re clicked in or gains focus.

Required

In HTML5, the 'required' Boolean attribute upholds that a form control or an element must have a value as soon as they are provided to the server. If the value is not present, then an error message will be shown up requesting the user to fill the desired fields.