Learn HTML by Building a Cat Photo App - Step 14

Tell us what’s happening:
Describe your issue in detail here.
I don’t understand how to make a link open in a new tab. Please help. I am new to this and I have little understanding of what goes where.
Your code so far

      <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.">

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

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

Link to the challenge:

mistake in closing tag of a. please correct it.

Remember to close the anchor tag properly by writing </a>.

Attributes are added with their value to the anchor tag like this:

<a attribute="value" href="example.com">clickableText</a>

What you have to to now is to figure out what the attribute and what the value is in the task description and put it in.

its telling me this: Your anchor (a ) element does not have a target attribute. Check that there is a space after the opening tag’s name and/or there are spaces before all attribute names.

How do I do this part? 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.

Your p and a element should be in one line. Remove space between your p and a element

Ok they are in the same line but I’m still stuck on the same problem

please share your code.

I reset it

See more cat photos in our gallery.

1 Like

The linesbrake does not cause any problems. You just have to add an attribute with a value to the anchor element.

<a attribute="value" href="example.com">clickableText</a>

you have done everythin right, just missed the attribute.

Another hint:
target ist the attribute, _blank its value

yea but it wont let me move on to the next lesson
Im still stuck on step 14

It says my anchor doesn’t have a target attribute.

1 Like

No I haven’t copy and pasted anything. I am just trying to learn this step by step.

1 Like

Hi! Please share your updated code so people can check it.

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 (').

Thats your fine code :point_down:

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

Just make to to close the anchor tag ‘’ and add the attribute :point_down:

<a attribute="value" href ="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>

Now you just have to figure out that of the given words in the task is the attribute and whats the value.

How do I find the attribute and value?

By reading the task :wink:

“Add a target attribute with the value _blank to the anchor”

I have to go back to work since my lunch breake is over. I hope you manage to master this task!

1 Like

I just passed it. The attribute was “target” and the value was "blank" -- thanks for the help guys I’ll be back for more questions in the future


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