Understanding step 41 of Learn HTML by building a cat photoapp

Hello, I am currently on step 41.

Q. To prevent a user from submitting your form when required information is missing, you need to add the required attribute to an input element. There’s no need to set a value to the required attribute. Instead, just add the word required to the input element, making sure there is space between it and other attributes.

I don’t have a problem with the challenge itself but I would like to understand why the required attribute does need a value.


code >

hallo and welcome back to fcc forum :slight_smile:

perhaps looking into this mdn article just might help you answer that, happy reading :slight_smile: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/required

1 Like

Its nice to be back!

Thanks so much for this, very informative :slight_smile:

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.