Tell us what’s happening:
Describe your issue in detail here.
Hello, I keep hitting a brick wall, my objective is to wrap the image in anchors elements, with it leading to a specific link. It keeps throwing 2 different errors. One: you are missing a closing (a) element at the end of imag. Two: you were supposed to have an img link cdn.codecamp ect you may have deleted it, that happens when I try to add the closing anchor element behind img element. Any guidance would be greatly appreciated!
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>
<a><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a><a> target="_blank" href="https://freecatphotoapp.com"</a> </a>
</main>
</body>
</html>
Your mobile information:
moto g stylus 5G - Android 12 - Android SDK 31
Challenge: Learn HTML by Building a Cat Photo App - Step 15
You appear to have created this post without editing the template. Please edit your post to Tell us what’s happening in your own words.
Learning to describe problems is hard, but it is an important part of learning how to code.
Also, the more you say, the more we can help!
That’s not quite 100% correct. The objective is to wrap the img element in an anchor element. That’s one anchor element, not multiple anchor elements. So you can get rid of the extra anchor elements.
You actually did wrap the img in an anchor element correctly but you didn’t add an href attribute to it.
Ok, that is what I was trying to accomplish, there at the end of the text code, on the img line. How do I properly do that here? Without it saying, I have deleted the img image with the same code that is currently there. What have I done wrong?
Honestly, I would reset the step to get the original HTML back. Then, the only thing you want to do is wrap the existing img element in an anchor element, just like you wrapped the words “cat photos” in an anchor element in a previous step. This means the only thing you should add is one opening a tag and one closing a tag, and of course add the href to the opening a tag. If you do anything else than add these two tags then you are doing more than is asked and will probably not pass.