Learn HTML by Building a Cat Photo App - Step 13

Tell us what’s happening:
Describe your issue in detail here.
Pls fam, how do I add the target ? I’m stuck

  **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; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36

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

Link to the challenge:

Hi @AbuTuraab

Hint: target is an Attribute

You have added an attribute to an element before such as src and href.

Now you add the target attribute into the anchor a.

Hope it helps!


Still stuck?

If you are still stuck, please provide us the code to your latest attempt enclosed with triple backticks like so

```html

paste code here

```

CatPhotoApp

Cat Photos

Click here to view more cat photos

A cute orange cat lying on its back.

Hey man you need to show us the RAW code, thats why I told you to enclose it with triple backtick.

Please enclose your code with triple backtick like so

```html

paste code here

```

Thank you man

<html>
<body>
  <h1>CatPhotoApp</h1>
  <main>
    <h2>Cat Photos</h2>
    <!-- TODO: Add link to cat photos -->
<p>Click here to view more <a href=" _blank 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>

Where exactly do I need to add the word _blank?

Hi @AbuTuraab

You need to add the word _blank into the target attribute.

Do you know how to add an attribute to an element? It is the same way you add src attribute in <img> and how you add href in <a>.

Hint: target attribute is part of the <a> element.

I still don’t get it please

Which part do you not get? Can you highlight the part you do not understand from what I wrote and press quote button?

here: What is the target attribute and how do i add the word “_blank”?

The target attribute is an attribute that belongs to a.

The target attribute requires a value. Just like most attribute.

<img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back.">

In this img element you have 2 attribute. One is src attribute and the other one is alt attribute.

The src attribute has a value of https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg"

and the alt attribute has a value of A cute orange cat lying on its back.

Now you need to add the target attribute and the value into a because the target attribute belongs to the a (anchor) element.

Do you understand what I mean? If not feel free to ask again. You can do this :1st_place_medal:

1 Like

Thank you this was sooo helpful

Target is an attribute.
So add it to the starting tag just like any other attribute.