why can’t i a target element in the anchor element i dont even know what a target element is
Your code so far
<html>
<body>
<main>
<h1>CatPhotoApp</h1>
<h2>Cat Photos</h2>
<!-- TODO: Add link to cat photos -->
<!-- User Editable Region -->
<p>See more <a href="https://freecatphotoapp.com">cat photos <target>_blank</target></a> in our gallery.</p>
<!-- User Editable Region -->
<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>
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 Edg/109.0.1518.70
Challenge: Learn HTML by Building a Cat Photo App - Step 14
Just to be clear, it’s a target “attribute”, not element.
Perhaps the instructions are not as clear as they could be? The target attribute allows you to force the link to open in a new window/tab. A lot of accessibility professionals will tell you not to do this but there are times when it is appropriate.
Adding a target attribute to a link works the same as adding any other attribute to a link, such as the href attribute you added in an earlier step. Use the href attribute as an example of how you would add the target attribute.
I would recommend you restart the step to get the original HTML back and then try again.
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.