Learn HTML by Building a Cat Photo App - Step 15

Tell us what’s happening:
Describe your issue in detail here.

Your code so far

<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->
      <p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>

<!-- User Editable Region -->

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

<!-- User Editable Region -->

    </main>
  </body>
</html>

Your browser information:

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

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

Link to the challenge:

Guys I am extremely confused here. The task is asking me to:

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

However I can’t add two web links to the same line? I have tried a few different ways of writing the code now but can’t get it right and getting frustrated.

I’m not sure what you mean by ‘web link’?

You have a jumbled together anchor and img tag. You must have separate img and anchor tags.

This is an anchor element that turns text into a link. You need an anchor element that turns an img element into a link.

Hi Jeremy, thanks for getting back to me.

Do you mean I need to create a new line for the anchor elements? rather then putting them with the img line of code? Sorry if the way im explaining it is a bit hard to understand im really new to coding

Nope.

You need to leave the img element alone and put a full anchor tag before it and a closing anchor tag after it.

This is what i keep getting? I cant understand what im doing wrong

Please post your actual code instead of a picture.

You are still mixing together your img and anchor elements. You must not do this.

You must make 0 changes to the img element you started with.

I have to post a screenshot as when posting just the code I can’t explain it properly.

I have tried this and still getting an error message?

Please stop posting pictures of code. Post your actual code.

I’ve edited your code 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 (').

This turns the text cat photos into a link. You need to turn the img element into a link instead.

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