Learn HTML by Building a Cat Photo App - Step 15

Hello. I am stuck at the 15th step ( Turn the image into a link by surrounding it with necessary element tags. Use https://freecatphotoapp.com as the anchor’s href attribute value.) as getting the " You should only add one opening anchor (a ) tag. Please remove any extras." error message. I read previous posts , changed and tried things but i still can’t figure out what the problem is.
Your code so far

<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->
      <p>Click here to view more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a>.</p>
<a href=“https://freecatphotoapp.com”><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back." </a> 
 </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/107.0.0.0 Safari/537.36

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

Link to the challenge:

You are not closing the img tag.

Also you " double quotes or single quotes ' .

I changed the double quotes to single quote and closed the image with > but this time error message is " Your anchor (a ) element should link to https://freecatphotoapp.com . You have either omitted the URL or have a typo."

Please show your current code along with the changes you made.

Copy paste did not work

-a href=“https://freecatphotoapp.com”–img src=‘https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg’ alt=‘A cute orange cat lying on its back.’- -/a-

changed the brackets to - so that maybe paste works here

Replace these quotes after href=

Worked! Thank you Kai1

1 Like