Learn HTML by Building a Cat Photo App - Step 14

Tell us what’s happening:
Where do I add the target attribute?

Your code so far


Cat Photos

Click here to view more cat photos.

A cute orange cat lying on its back.
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->
      <p>Click here to view more <a href="https://freecatphotoapp.com">cat photos.</a></p>
      <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

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

Link to the challenge:

1 Like

you add the target attribute next to the href attribute.

1 Like

is this the right attribute target=“_blank”

1 Like

Or is there anything wrong with the code.

yes that is correct.
just place that next to the href

So what is wrong with this?
<p>Click here to view more <a target= "_blank" href= "https://freecatphotoapp.com">cat photos.</a></p>

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 (').

you seem to have made changes to the original code shown in this step.
I suggest you click the reset button to reset the code back to its initial state and then add your target attribute (do not leave a space between the equal sign and the words next to it on either side)

Thank you. It was very helpful.

1 Like

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