Learn HTML by Building a Cat Photo App - Step 12

** You can turn any text into a link, such as the text inside of a p element.

<p>I think <a href="https://www.freecodecamp.org">freeCodeCamp</a> is great.</p>

In the text of your p element, turn the words cat photos into a link by adding opening and closing anchor (a) tags around these words. Then set the href attribute to https://freecatphotoapp.com.

Your code so far

      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->

<!-- User Editable Region -->

      <p>see more cat photos in our gallery <a href="https://freecatphotoapp.com"></a> cat photos </p>

      <a href="https://freecatphotoapp.com">link to cat pictures</a>

<!-- User Editable Region -->

      <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back.">

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

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

Link to the challenge:

Don’t add extra text to the p element. You added an second “cat photos” to the end of the p element. You don’t want to do that. Also, don’t make any changes to the text in the p element. You changed “See” to “see” at the beginning of the p element. I would reset the step to get the original HTML back.

The only thing you want to do is turn the existing words “cat photos” in the middle of the p element into a link. You do this by adding one opening a tag and one closing a tag. That’s it. Do not make any other changes.

And of course, you need to add the href attribute to the opening a tag.

the code gives an error

Welcome to the community!

I am not sure if you have solved this problem, yet.

But, if you are still struggling, here is an example and a link to more examples and guidance from the FCC news.


<p>This is the <a href="url provided in instructions">first sentence</a> of the story.</p>

first sentence

See how the first sentence is turned into a link by anchoring it on both sides with the tags.

This is what needs to be done with the cat photos with the provided attribute and its value of href="https://freecatphotoapp.com"
with the words cat photos remaining in the p element sentence.

FCC News Article Turn Image and Text Into Links

Happy coding!

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