HTML Step 15 anchor element turn into a link

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

<a href="https://www.freecatphotoapp.com/" target="_blank"/<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 not sure what I’m doing wrong someone please help me understand what I am doing wrong. I did review and I just don’t get it.,

Make sure to start a forum post directly from the ‘?’ box for requesting help in the future, it links directly to the step.

Also, make sure to surround your response in forums with three "`"s on each side so we just see the raw code.

I can’t quite see what you’ve done since the image was embedded but I assume your issue stems from your _blank. You only need to use that in the prior step

Try to compare your code to this and see and see what differs:

<a href="Link URL"><img src="Image URL" alt="alt text"></a>

(anchor)(Link)(An image with accessibility text)(slash anchor)

1 Like

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 is not a complete opening anchor tag. Every tag needs < and >

1 Like

Thanks for the edit.

Looks like the issue is the unneeded addition of target="_blank" and the unneeded ‘www’ in the URL. Although it wanted a new tab to be opened with the previous link, for this one it did not deem it required.

Edit: As mentioned below, the _blank is not an issue.

I don’t think the tests care about the extra attribute.

Just tested it, it indeed does not. Apologies for the confusion.

I completed the question. Thanks so much moving forward I understand.

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