Learn HTML by Building a Cat Photo App - Step 12

Hello everyone.

I would like to know why my p element code is wrong?
Thanks

<html>
<body>
  <h1>CatPhotoApp</h1>
  <main>
    <h2>Cat Photos</h2>
    <!-- TODO: Add link to cat photos -->
    <p><a href="https://freecatphotoapp.com">Click here to view more 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 (Windows NT 10.0; Win64; x64; rv:103.0) Gecko/20100101 Firefox/103.0

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

Link to the challenge:

The step says to:

In the text of your p element, turn the words cat photos into a link to https://freecatphotoapp.com.

You turned the whole sentence into a link, instead of just the words “cat photos”.

Hello. Thank you for your return. When I do that get the following hint: " Hint

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.".

That is, it does not accept either of the two texts. That’s my doubt.

Are there any errors on the website?

Can you provide your code?

Yes.

<html>
  <body>
    <h1>CatPhotoApp</h1>
    <main>
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->
      <p><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>

You weren’t supposed to delete all the other words inside that p element. You need to add back the "Click here to view more " part of the sentence. Only do exactly what the step tells you to do.

Ok.

I had understood that it was to make another paragraph with the words cat photos and not link those words within the sentence. Now it worked.

Thanks

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