Learn HTML by building a cat photo app - Step 49

Hi, I saw multiple people post about this step but they were mostly just looking for an answer. My issue is with the following instruction part:

Since your radio buttons do not have a value attribute, the form data will include indoor-outdoor=on , which is not useful when you have multiple buttons.

This doesn’t explain what indoor-outdoor=on is and without that context I don’t really understand why it’s bad here/why and when it’d be useful… There is also no mention of this in previous steps.

Context would be appreciated + perhaps this should be rewritten?

The value attribute in a radio button defines the data that gets sent if that particular button is selected. If no value attribute is provided, the default value sent is “on”.

The value on essentially just signifies that the radio button was checked/selected

Basically its bad because you are getting nothing significant when a form is submitted. You want the value that comes with the radio button you selected to, because you could do things with the value data that gets submitted. If you are just sent “on” then you cant do really much of anything with that

Much clearer, thank you!

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