Step 12 Help please!

The hint says Your code should only contain one anchor (a ) element. Remove any extra anchor elements.

I do not understand what I am doing wrong. Could someone please give me some feedback and advice on what I am doing wrong?

Here is the code:

  **Your code so far**
<html>
<body>
  <h1>CatPhotoApp</h1>
  <main>
    <h2>Cat Photos</h2>
    <!-- TODO: Add link to cat photos -->
    <p><a>Click here to view more cat photos.</p>
    <a href="https://freecatphotoapp.com">cat photos</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/86.0.4240.198 Safari/537.36

Challenge: Step 12

Link to the challenge:

1 Like

First, remove the anchor tag you have here. You don’t need it.

<p><a>Click here to view more cat photos.</p>

Second, the lesson wanted you to turn the existing phrase ‘cat photos’ in the existing text ‘Click here to view more cat photos’. You don’t need to write any new text, just turn the existing phrase ‘cat photos’ into the link.

You’ve turned the text ‘cat photos’ into a link, but it was supposed to remain part of the sentence ‘click here to view more cat photos’

Hope that helps!

Thank you so much for your help!

However, I am sorry, but I still have my code messed up.
This is my code so far:

The hint says: " Your code should only contain one anchor (a ) element. Remove any extra anchor elements."

However, I do not understand because I think that, I have removed the (a) anchors?

If you have any feedback please do write!

Happy Pride Month!

Hi, please post code not images it is much easier to read. This gif explains how to do that and format it so it is readable in the forum.

Second, your HTML is formatted incorrectly leading the the error message. You don’t need to remove those anchor tags as that stops the link from working.

The lesson needs you to turn the words ‘cat photos’ in the sentence ‘click here to view more cat photos’ into a link. How could you add html elements around the text the lesson gives you to do this? As a clue you don’t need to write the words ‘cat photos’ just add the elements to the existing text you are given.

This is how you format a link inside a paragraph. Apply that to your own code.

<p>I am a paragraph, <a href=“example.com”>I am a link.</a> I am more text.</p>

Thank you for your help.

<p>Click here to view more cat photos.<a href="https://freecatphotoapp.com">cat photos</a></p>

i dont know why it doesent work.

If you have a question about a specific challenge as it relates to your written code for that challenge, just click the Ask for Help button located on the challenge. It will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.

Hello

remove the cat photos. inside the opening p element
this should be

Click here to view more then add the cat photos after closing anchor tag before closing paragraph tag.