Learn HTML by Building a Cat Photo App - Step 14

why can’t i a target element in the anchor element i dont even know what a target element is

Your code so far

      <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.">

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36 Edg/109.0.1518.70

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

Link to the challenge:

Please 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!

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 wants you to add a target attribute in the opening anchor tag, with a value of _blank. This will open in a new tab.


As you can see above, there’s a target attribute with a value of _blank.
I hope this helps.
Thank you.

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.

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