Cant add the _blank value to make my link open in another tab

Tell us what’s happening:
Describe your issue in detail here.

  **Your code so far**
<html>
<body>
  <h1>CatPhotoApp</h1>
  <main>
    <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.">
  </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/96.0.4664.45 Safari/537.36

Challenge: Step 13

Link to the challenge:

I see your code and you didn’t really added a target attribute with the value _blank

what is it that you having problem with?

i’m having trouble understanding that step

Adding attribute target to an anchor, tells the browser that you want something different from the default behavior.

alright i have this:

Learn more.

i want to turn it into a link that takes me to Wikipedia page if i clicked on it.

so i add a element with href attribute like this:

<p> <a href="WEBSITE URL"> Learn more </a> </p>

now its working but when u click the link opens in the same Tab, you want that link to open in New Tab so the user doesnt leave your website simply add target attribute with value _blank like this:

<p> <a href="WEBSITE URL" target="_blank"> Learn more </a> </p>

1 Like