Learn HTML by Building a Cat Photo App - Step 14

it keeps on telling me to only add one opening anchor tag and i only have one like it said and it keeps telling me my code is incorrect

   **Your code so far**
<html>
 <body>
   <h1>CatPhotoApp</h1>
   <main>
     <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'</a> <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg"  alt="A cute orange cat lying on its back.">
   </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/104.0.0.0 Safari/537.36

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

Link to the challenge:

This is not a valid anchor element.

This is a valid anchor element.

Hey Jermey thanks for the help but i tried the valid anchor element format but it didnt work and still is telling me the same thing

What is the anchor element you tried?

i tried the one you said was a valid anchor element so i used it

(post deleted by author)

You need to put a valid anchor element around the img element.

can you show me what you mean by that because im confused what you mean by putting a anchor element around the image element

No, I cannot write the answer for you.

Your other anchor element is around the text ‘cat photos’.

You need another anchor element, but with the entire img inside instead of the text ‘cat photos’.

I understand that i tried this code : <img src <a target="_blank" href="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" </a> <alt="A cute orange cat lying on its back."> but this time it told me: You should have an img element with an src value of https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg . You may have accidentally deleted it.

You stuck the anchor element inside of the opening tag of the image element. That breaks the syntax. You cannot put an element inside of the opening tag of another element.

Can you identify where the text ‘cat photos’ is in the first anchor element? Physically point to it on your screen to help your brain see it! Instead of writing an anchor element around the text ‘cat photos’, write an absolutely identical anchor element, but put the full image element, from < to > in place of the text ‘cat photos’.

is img the image element?

Yes

i tried this code <a target="_blank" href="https://freecatphotoapp.com">img</a> src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back." but im still having no luck with it

hi Dan, in order to get timely help on the forum, you have to learn how to provide your code in the post. To do that you need to surround your code with three backticks (before and after the code). Like this:
```
all the code pasted here in the middle
```

You can also use the “Preformatted text” tool editing option which is an icon that looks like <\> and is about 3 icons to the right of the Bold icon on the forum post editor toolbar.

Please put all your code in your response if you need help. Not just one line.

You are still breaking the img element. You should make ZERO changes to the img element.

  1. Reset the code.

  2. Add an opening a tag before the full img element.

  3. Add a closing a tag after the full img element.

hey found a fix yet?

I’m equally learning so I could help as a learner

Thank you so much Jeremy for your help and time i finally figured it out!

2 Likes

But if that one line create problem for that we have to paste entire code here? Or just line that create problem and from up side 2 lines ?

You should post all the lines you changed.
Some people end up touching more lines than they were asked to modify.