Converting text into hyperlink (html-css)

Can anyone help me with the conversion of text to hyperlink using HTML-CSS?

  **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 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36

Challenge: Step 12

Link to the challenge:

Hi!

You need to add a closing tag to the p element that wraps around the anchor tag. It looks like this </p>

You also need to remove the greater than sign before the text ‘cat photos’.

1 Like

Thank you for your response. I made those corrections but it’s still giving me an error. I’m not sure what it is at this point. Should the

be on the same line as the others or beneath it?

1 Like

Hi can you please copy and paste your code so I can check to see what may need to be changed?

Also, this gif shows how to format code when it is pasted into the forum. As the forum accepts HTML code you will need to do this or your code will not be visible to me.

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

Remember to close > the starting <a> tag.

Also, the text cat photos should only be there once, as the link text.

Did that and it’s still not working.

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

I feel like it has gotten messy and I’ve confused myself at this point.

  1. You closed the element too early. Now the href is outside the starting tag, and it should be inside it.

  2. You have the cat photos text in the wrong place. It should be the link text and not the paragraph.

Example

<p>This is paragraph text <a href="https://someURL">and this is link text</a></p>

I closed it and it’s still not working.

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

Read point 2 in my post above.

It worked! Thank you so much!! You are awesome!

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