help, idk what im doing wrong. it keeps saying “You should only add one opening anchor (a ) tag. Please remove any extras.”
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 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.">
<!-- User Editable Region -->
</main>
</body>
</html>
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36
Challenge: Learn HTML by Building a Cat Photo App - Step 15
okay so i looked at it and was able to come up with this. however, it says “Your anchor (a) element should link to https://freecatphotoapp.com. You have either omitted the URL or have a typo.”
<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."
You have to be precise. Make sure all of your tags are closed correctly.
“Turn the image into a link by surrounding it with necessary element tags.”
The key here is the link (a) tag must surround (wrap) the tag.
It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.
We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.
href is an attribute and attributes have values associated with them.
for example: < img src=“h ttps://photo.jpeg”/ >
attributes and their values should be included inside of the opening tag like in the example above. In my example, src is an attribute and the link is the value.
All opening tags must have a beginning < and an ending >
for example: < main > or notice in the example in step 2 that I have both arrows in place with the element (img), attribute (src), and value (“h ttps://photo.jpeg”)
the anchor element should have an opening tag and a closing tag.
for example: opening tag < h1 id=“title” > closing tag < /h1 >
Sometimes a simple typo can mess up the code royally, so it helps to read backwards, meaning reading the last word or symbols and work your way backward and up. You might see you’ve missed something. Our brains tend to omit or insert when reading in our habitual way. If that makes sense?
In your first code example I can see 2 mistakes. If you go back to that or reset your code then pay attention to enclosing your opening tag appropriately and putting your closing tags in the correct place. The key word is surrounding or wrapping.