Learn HTML by Building a Cat Photo App - Step 45

Tell us what’s happening:
The id attribute with the value indoor is not working for me.
id=“Indoor” not working

  **Your code so far**
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->
      <p>Click here to view more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a>.</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>
      <h2>Cat Lists</h2>
      <h3>Things cats love:</h3>
        <li>cat nip</li>
        <li>laser pointers</li>
        <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>  
      <h3>Top 3 things cats hate:</h3>
        <li>flea treatment</li>
        <li>other cats</li>
        <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>  
      <h2>Cat Form</h2>
      <form action="https://freecatphotoapp.com/submit-cat-photo">
        <label><input type="radio"> id="Indoor" Indoor</label>
        <input type="text" name="catphotourl" placeholder="cat photo URL" required>
        <button type="submit">Submit</button>
  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.134 Safari/537.36 OPR/89.0.4447.83

Challenge: Learn HTML by Building a Cat Photo App - Step 45

Link to the challenge:

The id is an attribute which is used to identify individual elements in HTML but you’re using it as text which is causing this bug.

The syntax for HTML attributes is:

<!-- here class is an attribute and "one" is the value -->

<button class="one"> my button </button>

ps. The value is supposed to be indoor not Indoor.

Hope this helps! :smile:

Still cant get it , finding this so hard.

Okay let’s take this slowly,
Attribute are used to define the characteristics of an element. By adding an id to the input, i’m just giving the browser a way to identify it.

all you need to do is cut the id="Indoor" from your code, and paste it before > of the <input type="radio"> which will turn it into an attribute.

Thanks got it. working now.thanks

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