Learn HTML by Building a Cat Photo App - Step 55

Tell us what’s happening:
Describe your issue in detail here.

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">
            <legend>Is your cat an indoor or outdoor cat?</legend>
            <label><input id="indoor" type="radio" name="indoor-outdoor" value="indoor"> Indoor</label>
            <label><input id="outdoor" type="radio" name="indoor-outdoor" value="outdoor"> Outdoor</label>
            <legend>What's your cat's personality?</legend>
            <input id= "loving">
          <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 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

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

Link to the challenge:

Whats wrong with my code please

If you could list the steps you took to modify the code, what would they be?

1 Like

Which steps
im just trying to add an id attribute with the value loving to the checkbox input

Can you identify the checkbox input?

1 Like

yes <input type="checkbox"> Loving

Ok. How do you add a new attribute to an element?

1 Like

Like this

<input id="checkbox"> Loving

Why did you deleted the other attribute?

i dont know where to put the “id”

You put it right where you put it. You just need to not delete stuff unless the instructions asked you to.

1 Like

pls show me an example of how i can solve it

Look at some of the other inputs you have added so far, such as the Indoor and Outdoor inputs above. Do you see how you added multiple attributes to them? You put them all in the opening tag and separate them with a space.

Remember, HTML elements can have as many attributes as needed. In order to add more attributes, simply include an space in between. This is the correct code:

Mod edit: solution removed

@mendibox I know this is your first post so you probably weren’t aware, but we don’t post complete code solutions in here. We just try to help people figure out the anwer on their own.

Oh snap! You’re right, I wasn’t aware of but thank you for letting me know. It will not happen again.

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