Learn HTML by Building a Cat Photo App - Step 15

**Tell us what’s happening:
I got the section elements right, but it keeps saying: Your anchor (a ) element should have an opening tag. Opening tags have this syntax: <elementName> .

  **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>
    <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back.">
  **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 15

Link to the challenge:

1 Like

hello, I’m confused by your question.
This exercise (the one you linked to) does not ask for a section element.
It just wants you to make the img into a link?

1 Like

I was looking at other post and they had section elements for the one I linked and it said sectioning, but I need help with the tag because I gave it a closing tag.

I’m sorry I still don’t understand how to help you.
If the challenge you are on is not the one you linked to, please give a link to the one you are on instead.

I am on Step 15, but all the other posts I looked at had different captioned tasks then I do. So, I gave the link to the step I’m on and I need help with the task because it says that I need to Turn the image into a link by surrounding it with necessary element tags. Use https://freecatphotoapp.com as the anchor’s href attribute value.


okay. So please click on Restart Step button.
This will erase the extra code you added.
After that, you need to make the img tag into a link.
To do that you need to use an anchor element.

Here’s an example of me using the anchor element to turn the words
Click Me!
into a link, please review the example and do something similar (but with the img element instead of the words Click Me!)

<a href="the-link-here">Click Me!</a>


Do I keep the target attribute?

I made the link correctly already, I just tried using other browsers but they don’t work.

1 Like

if this was not fCC, for eg, if you were creating a website somewhere else on your own, you could add any attribute such as target and that would be fine.
However, in fCC, you have to follow the challenge instructions exactly.
(the tests assume you will and in many cases will fail if you try to do something unexpected)

But in the last step, they told me to add the target attribute with the value of blank.

I’m sorry I’m having a hard time understanding you.
It sounds like you don’t need help making a link as you said “I made the link correctly”.
If you are good with this step, you should be able to pass this challenge.

If you are not able to pass the challenge, please post your updated code as the one you posted earlier was not correct.

I did everything write but the caption with my original post is what the hint says.

can you post your updated code? I just need to see it so I can comment further.

For sure give me a second.

1 Like

Im stuck here too. Do you wrap the <a tags around the Img tags?

take a look at the example I posted earlier of how to make the words “Click Me” into a link.
Just like I put these words inside the opening and closing tags of the anchor tag, you must do the same but with the img

1 Like

You do very much so do that

So I edited the code, can you help me now?

your new code is the one above in the first post (?)

If yes, I do not see that you have attempted yet to make the img into a link.

To make it into a link you have to use the anchor tag. Put the opening tag to the left of the img and the closing tag to the right of it.

Make sure your href is the one given to you.

Let me know if you are still stuck (please post new code if yes)

3 posts were split to a new topic: Catphotoapp step 15