HTML <input> required Attribute (original) (raw)

Last Updated : 25 May, 2026

The required attribute is used to make an input field mandatory before submitting a form. It helps ensure that users fill in important fields.

**Syntax:

**Example 1: Illustrates the use of required attribute in input Element.

html `

required Attribute