Build a Cat Photo App - Step 15

Tell us what’s happening:

Step 15
To open links in a new tab, you can use the target attribute on the anchor (a) element.

The target attribute specifies where to open the linked document. target=“_blank” opens the linked document in a new tab or window.

Here is the basic syntax for an a element with a target attribute:

Example Code
freeCodeCamp
Add a target attribute with the value _blank to the anchor (a) element’s opening tag, so that the link opens in a new

Your code so far

<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->
      <p>Everyone loves <a href="https://cdn.freecodecamp.org/curriculum/cat-photo-app/running-cats.jpg">cute cats</a> online!</p>

<!-- User Editable Region -->

      <p>See more <a href="https://freecatphotoapp.com" target=_blank>cute cats</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 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3.1 Safari/605.1.15

Challenge Information:

Build a Cat Photo App - Step 15

You are missing the quote marks in your code.

Thanks Jazz
I am just a beginner. any advices Jazz?

I’m new to CodeCamp myself, I’m helping out others on tasks I’ve already completed. I’m hoping by helping others I can retain what I have already learnt. Can’t say I have a lot of advice but keep going as we will all get there. :blush:

2 Likes

how can I have a mentor here Jazz. I feel lost when I study by myself. thank you

when you are lost you can come and ask questions here on the forum or on the discord server

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