HTML Required Attribute Tutorial | Learn WDH Required Attribute

HTML Required Attribute

Next, we can further enhance our form, by making any of the input fields compulsory because of the submitting of the form.

So to make a particular field compulsory, we can add the required attribute It's an input element.

Output :