Learn HTML by Building a Cat Photo App - Step 15

Tell us what’s happening:
Describe your issue in detail here.
I have read all the discussions on this subject but i am still lost.
Your code so far

<p>See more <a href="https://freecatphotoapp.com">cat photos in our gallery.</p>
      <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg"</a> alt="A cute orange cat lying on its back.">

I’ve edited your code 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 (').

Review how you turned the words cat photos into a link. You did this by wrapping them in an anchor element (i.e. a tags). That’s how you turn anything into a link. So do the same thing to the image element.

Also, do not change anything else on the page. You removed the closing a tag around cat photos. You don’t want to do this. The only thing you want to do is turn the image into a link.

You might want to reset the step to get the original HTML back before you try again.

if i touch nothing else and add an additional anchor it says i should only have one anchor tag… i will have 2 anchor tags if i touch nothing and add one correct?

1 Like

I believe the hints aren’t quite as good as they can be for this step, so you might be getting some misleading information from them. But I can’t know for sure unless you show us your HTML. So try again and if it doesn’t work then paste your HTML in here so we can see what you did.

To display your code in here you need to wrap it in triple back ticks. On a line by itself type three back ticks. Then on the first line below the three back ticks paste in your code. Then below your code on a new line type three more back ticks. The back tick on my keyboard is in the upper left just above the Tab key and below the Esc key. You may also be able to use Ctrl+e to automatically give you the triple back ticks while you are typing in the this editor and the cursor is on a line by itself. Alternatively, with the cursor on a line by itself, you can use the </> button above the editor to add the triple back ticks.

welcome to the community :smiley:

If you find yourself confused about how tags, attributes and content works together.
You can use a search engine to search the tag, attribute and find some references that go into deeper detail.

Finding a website with beginner friendly references can really help early on.

  <p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>
    </a>  <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a>

You added two closing a tags around the image. I’m pretty sure that first one should be an opening a tag :slightly_smiling_face:

Also, you need to tell the link where it should link to.

“Use https://freecatphotoapp.com as the anchor’s href attribute value.”

Again, look at the link you created for the words cat photos to remind yourself how this is done.

were these challenges titled previously? I only see numbers for each challenge which makes things hard to find

Your cat photo challenge would be step 12

Let’s concentrate on the last code you pasted in here:

<p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>
    </a>  <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a>

Do you see how for the cat photos link you had an opening a tag before the words and a closing a tag after the words? That’s what you need to do for the image as well. Do you recognize the difference between the opening and closing tags?

That’s definitely in the right direction. Now you need to tell the link where to go. How did you do that with the cat photos link in the p element?

P.S. It’s best if you don’t delete things. It’s OK to make mistakes.

i know this will take time but at this point i’ve spent 1.5 hours trying to figure this out. I appreciate the help but at this point i feel like i need the solution… should i spend days on the same challenge or is there a point when a solution is provided? I want to learn and I feel like im just throwing spaghetti against the wall. i know this is only the beginning of my journey but i would like to know how to face these types of challenges that take up more time than i honestly have.

You are doing the right thing. You came to this forum asking for help. Now you just need to accept it :slightly_smiling_face:

I gave you feedback on several of your posts, but then you deleted most of them. So I’m not sure if you read my feedback?

If I recall, your last (now deleted) post was actually almost correct. You were just missing one thing.

Take it one step at a time. Don’t keep making a ton of changes. Read our feedback and try to make sense of it. Then make the changes you think you need to make to fix your issues and post your updated code again if it still isn’t working.

And remember, you already have an example of how to turn something into a link because you have already turned the words cat photos into a link. So you can refer to that as an example of how to turn the image into a link. The only difference is that one was using words and the other is using the image element.

<a href img src>="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."</a>

i delete because when i post the code it shows a blank bar and i am unsure if my code can be seen

I was able to see it just fine. I would recommend you not delete your posts.

you can se this? because i cannot. Your thoughts?

Finally! as you mentioned i have to direct the anchor tag to href but the suggestions wasn’t so helpful that fcc gives after checking code

Your code is missing the tag in the right spot. You have it before the alt for the image.
You also seem to be missing the entirely.
Could this be what the error is coming from?
I don’t know if you’ve modified this since then. I’m just going off the code I see