Step 12 test guidance

This was what I’m asked to do " 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."
I’ve tried everything possible but I cant seem to figure out the issue.
Below is the code I’m supposed to work on but I don’t know what to do. Please guide me…

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

Challenge: Step 12

Link to the challenge:

You don’t want to delete any text from the sentence in the p element. I would restart the step to get the original HTML back. The only thing you want to do is add the opening and closing a tags around the words “cat photos” in the sentence so that it becomes a link. Just like you did with the words “cat photos” in the link below the p element.

Thank you for the response but when i do that, it keeps telling me “Your code should only contain one anchor (a ) element. Remove any extra anchor elements.”

2 Likes

You’ll need to show us your updated HTML 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.

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

You didn’t turn the words “cat photos” in the p element into a link. You don’t want to change any text in the p element. You just want to add the opening and closing a tags around the words “cat photos” in the p element so they become a link. After you do that then you want to delete the original “cat photos” link below the p element.

Hi, the problem it’s not the code, but the words, you should try to create the link in cat photos whit the . out of it, at least that’s was the thing for me… spent 3h on a dot…

1 Like

here is an example

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

Hey @Joseph290, I know you’re new here so I thought I’d let you know that we try not to just give answers here but rather help people find the answer for themselves.

1 Like

Oh, ok sorry ;D
Luckly it was just a dot and nothing to much important!

2 Likes

Thanks Bro :smiling_face_with_tear: :smiling_face_with_tear: :smiling_face_with_tear: :smiling_face_with_tear: :smiling_face_with_tear:

1 Like

Na man this was really confusing. The wording are really twisted and they also don’t talk about a period. Spent a day and a half also restarted the course twice to see if I was missing something.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.