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

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 'target _blank'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/101.0.4951.67 Safari/537.36

Challenge: Step 13

Link to the challenge:

Hello @danlan959. What is your question?

html tags attributes goes (most the times) in pairs in this format
attribute="value"

as example compare ur Image tag, which have 2 attributes, src and alt

<img src="https://etc"
     alt="A cute cat"

Hello @danlan959 In this task you need to add an attribute to the tag. Exactly in your situation href="" ==> this is an atribute within a tag. So inside of a tag you need to add an attribute. Between the quotes you need to put value. Your value is _blank. You may use single quote or double quotes. I hope I was able to give you a hint)

2 Likes

I am also having issues with this step - the instructions 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.

You are meant to add the attribute to:
<p>Click here to view more <a href= "https://freecatphotoapp.com"> cat photos </a>. </p>

However, it is very unclear where the attribute should go in the string and every time I put the attribute _blank into the beginning of the anchor, whether it’s within the quotation marks of the link or before them, it is incorrect. I’m stumped where _blank is supposed to go or if I’m simply missing something alongside it?

You need to place the attribute inside of the opening <a.....> tag

2 Likes

a better google search gave me the answer - it should look like:

<a target="_blank"“link url” and the rest of your anchor

5 Likes

Yup. You add it just like you’ve added attributes to opening tags in previous steps.

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.

<a target=“_blank” href="https…

This step was bit confusing, after (a) you just have to add the attribute target and its value _blank and the rest will be unchanged. I hope this helped you:)

1 Like

this is not work an i need more clarification on this task

Hi!

If you have a question about a specific challenge as it relates to your written code for that challenge, just click the Ask for Help button located on the challenge. It will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.

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