Inactive form fields

Some attributes can limit interaction with a form field.

Disabled

Disabled form fields cannot be focused, changed, and aren’t submitted with the form. For more detailed information, check out MDN Web Docs on disabled form fields.

The disabled attribute works on all sorts of inputs, but it should be used with caution.

Text input


Radios

Do you like Adventure Time?

Checkboxes

What is the magic number?

Buttons

It even works on buttons:



Read-only

The values in read-only inputs can still be selected, but they cannot be changed. MDN has more details on readonly.