Learn HTML by Building a Cat Photo App - Step 12

how to use the anchor attribute in p
Your code so far

<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <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">cat photos</a></p>
      <a href="https://freecatphotoapp.com">link to cat pictures</a>
      <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back.">

<!-- User Editable Region -->

    </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/115.0.0.0 Safari/537.36

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

Link to the challenge:

Hello and welcome

Hello.

The exercise says:

  • In the text of the p element, turn the words cat photos into a link to https://freecatphotoapp.com by adding opening and closing anchor (a) tags around those words.

And what you have done is add a link to the text instead of nesting only those two words. So your sentence looks like this:

See more cat photos in our gallery. cat photos

It should look like the following example:

You have this sentence:

We have more ice creams in the store.

  • Turn the more ice creams words into a link to https://freecatphotoapp.com by adding opening and closing anchor (a) tags around those words.

You will have a sentence like this:

We have more ice creams in the store

So the code you would have to write would be:

We have <a href="https://freecatphotoapp.com">more ice creams</a> in the store

Review the example and make adjustments to your code.

Grets.

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