Learn HTML by Building a Cat Photo App - Step 12

Tell us what’s happening:
There’s apparently an issue with the code but i mainly have issue with the step description being

In the text of your p element, turn the words cat photos into a link to https://freecatphotoapp.com. When you are done, remove the old anchor tag and text below the paragraph.

This description confuses me greatly. “cat photos” is already a link and has the hint stated

Your code should only contain one anchor (a) element.

That should be nested inside a <p> element but it already is?
…And here i go again knocking my head on a brick wall for another decade… :confused:

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 cat photos.
      <a 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.">
  </main>
</body>
</html>
  **Your browser information:**

User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:104.0) Gecko/20100101 Firefox/104.0

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

Link to the challenge:

I think you’re trying to interpret the hints from the perspective of what you wrote.
But the person who created the step and hints was not prescient to predict what you will write. They were referring to the existing code, before you changed it.

Best thing to do then, is to restart the step which will reset the code.
Then, find the word cat photos and make it a link (do not add any more words ‘cat photos’, just change the ones given to you to become a link)
Finally delete the line that the instruction told you to delete (the one below the given paragraph).

Take it one step at a time, and let us know how it goes.

1 Like

Quite on the contrary, what i wrote is what i ended up writing, after restarting many times. The first hints indicate

Your anchor (a) element should be nested within the p element.

which is what you see on my code. Pressing the check button gives

After nesting the anchor (a) element, the only p element content visible in the browser should be Click here to view more cat photos. Double check the text, spacing, or punctuation of both the p and nested anchor element.

Guided by this hint, i removed cat photos so that the only visible content is Click here to view more cat photos. as asked, however checking it again gives this

The link’s text should be cat photos. You have either omitted the text or have a typo.

What is it am i asked to do exactly?

But, it already is… it has an href…:confused:

You mean the img?? Now i’m even more confused…

So if the original text was:
Click here to view more cat photos.

You are being asked to make it look like this:
Click here to view more cat photos.

Such that the last words are the links.

no, they didn’t ask you to delete the img, they said:
When you are done, remove the old anchor tag and text below the paragraph.

Now that is helpful… there were 2 lines containing cat photos i was wondering which one the description meant. It didn’t seemed very specific.

yes but if you read carefully the instruction was
" In the text of your p element, turn the words cat photos into a link"
^^^^^^^^^^^^^^^^^^

So there is only one cat photos phrase in the “text of the p element”.

should the p elemet be in the anchor one or the anchor element inside the p one ??
it looks exactly like u said but it still says “the links text schould be cats photos” :roll_eyes:
(istg this is so mf confusing)

I can help you with that but I need you to create your own topic (everytime you write a post like this in someone else’s topic you are spamming them).
Please click on the Ask for Help button and include the same question you have here there. (along with the code and link to the step which should be pulled in automatically by the button)

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