Detailed answer
Required adds a built-in constraint for compatible controls, so normal form submission can be blocked when a value is missing.
Give the field a clear label and explain required fields in visible text. Browser validation improves feedback but can be bypassed, so repeat important checks on the server.
Example
<label for="message">Message (required)</label>
<textarea id="message" name="message" required></textarea>
Understanding the behavior
Required participates in constraint validation for supported controls. Validation normally runs through an appropriate form submission path, but custom scripts and novalidate can change that behavior. Browser validation improves feedback; the server must enforce its own rules.
Practical implementation notes
Submit the empty form using both the keyboard and the normal submit button. Then provide a valid value and confirm submission proceeds. Include clear instructions before the user encounters an error.
How to check it
Submit the example without a value using its normal submit button.
Expected result
The compatible required control prevents normal submission and requests a value.
Watch out: Passing a browser check does not make submitted data trustworthy.
Read the reference ↗