Learn HTML by Building a Cat Photo App - Step 46 - Help

Example Code

<input id="email">

Add an id attribute with the value indoor to the radio button. When elements have multiple attributes, the order of the attributes doesn’t matter.


<label><input type="radio"> Indoor</label>          
<input type="text" name="catphotourl" placeholder="cat photo URL" required>

<label><input type="radio" id="indoor"> Indoor</label>

         <button type="submit">Submit</button>

I have placed the HTML code, see below, but it doesn’t work, can anyone help me, I don’t understand it anymore

<label><input type="radio" id="indoor"> Indoor</label>


<label><input type="radio"> Indoor</label>          
<input type="text" name="catphotourl" placeholder="cat photo URL" required>

<label><input type="radio" id="indoor"> Indoor</label>

         <button type="submit">Submit</button>

I have placed the HTML code, s

Your code so far

<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <section>
        <h2>Cat Photos</h2>
        <!-- TODO: Add link to cat photos -->
        <p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>
        <a href="https://freecatphotoapp.com"><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a>
      </section>
      <section>
        <h2>Cat Lists</h2>
        <h3>Things cats love:</h3>
        <ul>
          <li>cat nip</li>
          <li>laser pointers</li>
          <li>lasagna</li>
        </ul>
        <figure>
          <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/lasagna.jpg" alt="A slice of lasagna on a plate.">
          <figcaption>Cats <em>love</em> lasagna.</figcaption>  
        </figure>
        <h3>Top 3 things cats hate:</h3>
        <ol>
          <li>flea treatment</li>
          <li>thunder</li>
          <li>other cats</li>
        </ol>
        <figure>
          <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/cats.jpg" alt="Five cats looking around a field.">
          <figcaption>Cats <strong>hate</strong> other cats.</figcaption>  
        </figure>
      </section>
      <section>
        <h2>Cat Form</h2>
        <form action="https://freecatphotoapp.com/submit-cat-photo">

<!-- User Editable Region -->

<label><input type="radio"> Indoor</label>          
<input type="text" name="catphotourl" placeholder="cat photo URL" required>

<label><input type="radio" id="indoor"> Indoor</label>

         <button type="submit">Submit</button>

<!-- User Editable Region -->

        </form>
      </section>
    </main>
  </body>
</html>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36

Challenge Information:

Learn HTML by Building a Cat Photo App - Step 46

1 Like

Hi and welcome to the forum.

Please click the reset button to restore the original code of the step as you have too much code now.

Then:
Add the attribute they want to the input element in the editor. Don’t add any other elements or attributes.

Hi,

I think you placed the id=“indoor” to the wrong input element, I think it supposed to be inside the first input element. :slight_smile:

thank you very much, I did what you said (click the reset button to restore) and then I placed the html code below

Indoor
and it works :+1:

1 Like

Great. Please note that there is no need to post a solution here. We prefer you didn’t.