Learn HTML by Building a Cat Photo App - Step 14

Tell us what’s happening:

See more target="_blank"> cat photos.

Please assist me on how to correctly do the target attribute

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">target="_blank"> cat photos</a>.</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/128.0.0.0 Safari/537.36

Challenge Information:

Learn HTML by Building a Cat Photo App - Step 14

Hi there and welcome to our community!

Your p element is missing some text and there are other issues too, so I would hit the Reset button to restore the starting code for this step:

<p>See more <a href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>

To add the target attribute, you should put it next to the href attribute, inside the opening anchor tag, separating it with a single space between the two attributes. You don’t need to add any additional angle brackets or other syntax. You can add multiple attributes to HTML elements in this way. The order of attributes doesn’t matter.

2 Likes

Thank you so much, I finally got it right.

2 Likes