Learn HTML by Building a Cat Photo App - Step 14

I don’t know why my code doesn’t work when I did everything it said. My code in 14 step is:

CatPhotoApp

Cat Photos

See more cat photos in our gallery.

A cute orange cat lying on its back.

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">cat photos</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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36

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

Link to the challenge:

I don’t see a target attribute?

1 Like

The directions say

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.

Where did you do this because I do not see it in the line of code you should of changed?

When I write a comment, the attribute _blank comes out, and when I post a comment, it is deleted.

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

Where’s the target part?

I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

Where is the mistake?

Please use the formatting instructions above instead of posting a picture of your code.


Same question… where’s the target part?

You need a target attribute set equal to the value _blank.

Can you write me the correct code?

Nope, that’s not allowed.

So how should I write it if I still don’t understand where I’m going wrong?

Can you describe, in every small detail, what looks different between this correct href attribute:

and this incorrect target attribute:


This is what i wrote. (with target _blank)

When I don’t put _blank, it shows me the error again.

This is the same thing you posted before. Please don’t post pictures. Post your actual code.

Can you please try to describe how you (good) href attribute and your (bad) target attribute look different?

How do you think they look different? I get the same error with and without target.
error

there’s literally a word target that you need to have in code.

that word is one of html attributes.

I can’t write the answer for you. I’m trying to help you write the answer.

Can you please try to describe how these are different?

One big difference I see is that the correct attribute uses = and the incorrect one does not.

Omg, I’m so stupid. I solve the problem. Thank you everyone.

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