I dont know if i need to take an anchor out, Im not sure how to "wrap" the image correctly

I don’t understand your question. Again, look at how you created the link for “cat photos”. You are doing the exact same thing here except instead of “cat photos” between the a tags you have an <img>.

so im back having a go :slight_smile:


<html>
  <body>
    <h1>CatPhotoApp</h1>
    <main>
      <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>

I'm trying to move the anchor around but i feel i'm getting the opening and closing wrong now ....how far am out to getting the correct answer?

I just watched a youtube video and some kid used a dead link,

¬¬¬

<a href="#"><img 

thats what I tired but nothing still

It shouldn’t be a dead link, it says what to use as href value

Turn the image into a link by surrounding it with necessary element tags. Use https://freecatphotoapp.com as the anchor’s href attribute value.


I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

You basically have it here on this try except you have two minor issues. Tiny details will kill you :slight_smile:

  • You stuck an extra space at the beginning of the href URL. While technically this will still work, the FCC tests don’t like extra spaces where they shouldn’t be. So get rid of that extra space and in general don’t add extra spaces where they aren’t needed or expected.
  • An image tag is <img>. Notice the beginning < and then ending >. Now look at your image tag. Do you see both of those?
1 Like

<html>
  <body>
    <h1>CatPhotoApp</h1>
    <main>
      <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"/a><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>

I cant seem to get it, if i close the img it makes the picture disappear. I’ve looked online and everywhere says to leave the img open till the end of the url.

Hi @SuperMeaks ,

Please, restart the challenge and do not modify or change anything in the img element.
Simply add the opening a tag before the img and the closing a tag after the img.

1 Like

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

its this a and opening and closing im just not getting,

Alright, now you have them in the right places.

What you need now is to use the https://freecatphotoapp.com as the a element’s href attribute value.

So you need to add the href attribute to the opening a tag.
The same way you have it in the a element before :

1 Like

Yes ! .It’s an opening and close tag. What’s the code instruction to carryout ?

Turn the image into a link by surrounding it with necessary element tags. Use https://freecatphotoapp.com as the anchor’s href attribute value.

Thank you so so so much!!!

1 Like

make sure all what concern the image link should be within the “a” element with your href in the “a” opening tag

1 Like

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