Learn HTML by Building a Cat Photo App - Step 13

Tell us what’s happening:
i cant perform the action that says “Add a target attribute with the value _blank to the anchor (a ) element’s opening tag, so that the link opens in a new tab.” please help me out

  **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/103.0.5060.134 Safari/537.36 Edg/103.0.1264.77

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

Link to the challenge:

What have you tried? This looks like the original code.

2 Likes

i sincerely dont know what they ment by what they wanted me to do i’m very confused

1 Like

This is a href attribute

This is a src attribute

This is a alt attribute

You need to add a target attribute the same way you added these three attributes.

oh ok what about the "_blank " i was told to add it too. Add a target attribute with the value _blank to the anchor (a ) element’s opening tag, so that the link opens in a new tab. so what do you think i do

The value is the thing on the right side of the =

<a attribute="value">
1 Like

Tell us what’s happening:
Add a target attribute with the value _blank to the anchor (a ) element’s opening tag, so that the link opens in a new tab. this is really confusing

  **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> <a target="_blank"></a>
    <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/103.0.5060.134 Safari/537.36 Edg/103.0.1264.77

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

Link to the challenge:

here was what i tried doing but i still couldn’t solve it i’m still confused

You created a brand new anchor element, but that’s not what the instructions asked you to do. You should add the target attribute to the anchor element that you already had.

but where exactly is it inside the the anchor caring the link?

Inside of the opening tag.

You put it inside of a brand new opening tag. It needs to instead go into the original opening tag.

i’m sorry please can i have an example of what i really need to do :pensive:

I cannot write the answer for you.

You have the correct attribute and value here. Now you need to put it in the opening tag of your original anchor element

3 Likes

hi
thanks i figured that i was actually placing it right but i needed to restart the step so it wasn’t working at first. thanks for time. thank you

2 Likes

Thanks, i used your answers to fix it, and it works!

1 Like

I was tripped up by that one as well. When I read the following at Mozilla.org, it cleared up what was really going on.
<a>: The Anchor element - HTML: HyperText Markup Language | MDN

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