← BYTES
HTML·Starter·Ref: 2.1.12

What does the `required` attribute do when added to an `<input>` element inside a form?

Have a question about this video? Mention reference 2.1.12 when you contact us.

a.It hides the input field from view
b.It automatically fills the field with a default value
c.It prevents the form from being submitted until the user has filled in that field
d.It makes the field read-only, uneditable by the user
The required attribute is a built-in HTML5 form-validation constraint -- the browser will block form submission and show a validation message if a required field is left empty, with no custom JavaScript needed for this basic check.

Find this on YouTube & Instagram

Every BYTES video is tagged with its reference number and topic — search any of these on YouTube or Instagram to find this one:

#BYTES#BYTES2112#HTML