Learn HTML by Building a Cat Photo App - Step 12

Step 48 on the cat photo app the radio buttons for indoor and outdoor don’t have a value and are both set to the value=on. The last step I wrote code for the name=indoor-outdoor. In the code below I put radio=indoor or radio=outdoor is what I was trying to use to complete this but that wasn’t being accepted. So what is it asking me to type for the radio values as being

Here is the question:
Add a value attribute to both radio buttons. For convenience, set the button’s value attribute to the same value as its id attribute.

     <label><input id="indoor" type="radio" radio="indoor" name="indoor-outdoor"> Indoor</label>
    <label><input id="outdoor" type="radio" radio="outdoor" name="indoor-outdoor"> Outdoor</label>
  *

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

Hey! welcome to the freeCodeCamp’s community forums.

When you submit a form, the data in that form is sent to the database in the form of
key value pairs. for example if you enter your name into an input, the developers of the site usually name the input to a descriptive name like “name” and when you click enter “Name”: “taran” is sent to the server.

In radio buttons, because you are only supposed to select one option among many, the name of each radio button is set to the same value which is why they both have the name attribute set to the same value “indoor outdoor”. however you’re still expected to choose an option, this challenge expects you to add the “value” attribute to each radio input and set their values to the given values.
Hope this helps! :smile:

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