Required attribute
The required attribute is an HTML boolean attribute indicating that a form control must have a value for its form to pass validation.
Architecting Accessibility
An HTML attribute that indicates that a form control must have a value before its form can be submitted.
- How it is used
- Clarifies mandatory form inputs so people know what information is needed and can avoid incorrect submissions.
- How deep it goes
- Explains how the attribute exposes a required state to assistive technologies, without detailing its implementation.
- Examples
- Uses a booking-reference field and a dog-owner form to pair required controls with visible labels and instructions.
- What you can do after
- Apply the required attribute alongside visible “required” label text to communicate mandatory fields programmatically and visually.
Read how Architecting Accessibility explains required attribute →
HTML5 in Action
The required attribute specifies that a form control must have a value before its form can be submitted.
- How it is used
- Marks fields that must be populated before browser-side form submission can proceed.
- How deep it goes
- Defines the populated-field check and browser error, while deferring fuller form-validation details.
- Examples
- Uses a required field in an order form’s contact-details section and contrasts browser checks with server-side checks.
- What you can do after
- Apply native browser validation by marking fields that must be populated, while retaining server-side checks.
Also covered in
Related concepts
- attributekind of · An attribute is a named property or piece of information associated with an entity, object, or structured data item.
- required fieldconfigures · A required field is an input, property, or configuration value whose presence or value is mandatory for an instance or operation to be valid or successful.
- assistive technologyproduces · Assistive technology is hardware or software that enables people with disabilities to access, perceive, control, or interact with digital content and systems.
- form submissionconfigures · Form submission is the process by which a browser sends the values of a web form to a destination for processing.
- client-side validationimplements · Client-side validation is the checking of data in client software before it is sent to a server or otherwise processed remotely.
Questions about required attribute
What is required attribute?
The required attribute is an HTML boolean attribute indicating that a form control must have a value for its form to pass validation.
Which Manning books explain required attribute?
Architecting Accessibility and HTML5 in Action.
What is required attribute a kind of?
Required attribute is a kind of attribute. An attribute is a named property or piece of information associated with an entity, object, or structured data item.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

