Delete extra anchors, when there's only one?

Tell us what’s happening:
Step 12

“Turn the words cat photos located inside p element into a link using the same value for the href attribute as the link below the p element. The p element should show the same text in the browser, but the words cat photos should now be a link. Make sure to remove the a element with the text cat photos on the line below the p element.”

This is for line 7. Link works, and there is only one anchor element, yet when I check it says its incorrect?
Your code so far

<html>
<body>
  <h1>CatPhotoApp</h1>
  <main>
    <h2>Cat Photos</h2>
    <!-- TODO: Add link to cat photos -->
    <p> <a href="https://freecatphotoapp.com">Cat Photos</p>
    
    <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/102.0.5005.63 Safari/537.36 Edg/102.0.1245.33

Challenge: Step 12

Link to the challenge:

The tests are confused because you never closed this anchor element with a </a> tag.

1 Like

you should make cat photos part of the p tag’s text as link. for example
Click here to view more cat photos.

1 Like

Thanks. for your input

I get that, just not getting how is my issue. Imma keep hammering away.

What is your updated code?

<html>
  <body>
    <h1>CatPhotoApp</h1>
    <main>
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->
      <p> <a href="https://Click here to view more cat photos.">cat photos </p>
      <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>

Sorry I am completely fresh on this. I want to get into it so started the free stuff to get the hang of it and aren’t even able to pass the 12th step on my first go of it smh

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

You still need to add a closing </a> tag.

Also, you changed the url to something invalid.


Let’s back up:

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

The entire contents of the second line should replace the two words cat photos on the first line.

1 Like