Learn HTML by Building a Cat Photo App - Step 14

Im not really sure how or where to add a target attribute with the value _blank to the anchor (a ) element’s opening tag. Do I literally put the word ‘_blank’ within the “<a”?
This is my first day at coding and I already feel dumb and stuck…

Describe your issue in detail here.

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 _blank 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/122.0.0.0 Safari/537.36

Challenge Information:

Learn HTML by Building a Cat Photo App - Step 14

You appear to have created this post without editing the template. Please edit your post to Tell us what’s happening in your own words.
Learning to describe problems is hard, but it is an important part of learning how to code.
Also, the more you say, the more we can help!

Yes, you have to use the string _blank but as the value (the text belonging) to the attribute target. If you are not confident yet about the word attribute, then look below, there’s another attribute named alt

Im still not getting it. My apologies. So, do I type

‘<a_blank’? is that it or do I also add _blank at the closing 'a"?

In the request it says attribute target, did you miss it?
Attributes goes inside the opening tag of an element, in this case <a>.

<p class="flavor">Something here</p>

<p> is the opening tag
class is the attribute
"flavor" is the value of the attribute

so, in my case, it would be

<a target=_blank

Do not forget the quotations. Try that after you amend it.

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

I finally got it. But I had no clue I needed to use the ‘=’ sign. Also, i didnt really understand where in the opening tag I needed to insert the attribute and the value. this is so complicated…

edit: the lesson does not teach me about the usage of ‘=’ ;-;

I believe it does. Starting in step 8 it shows you:

Here is an example of an img element with a src attribute pointing to the freeCodeCamp logo:

<img src="https://cdn.freecodecamp.org/platform/universal/fcc_secondary.svg">

In step 9 it also shows you

All img elements should have an alt attribute. The alt attribute’s text is used for screen readers to improve accessibility and is displayed if the image fails to load. For example, <img src="cat.jpg" alt="A cat"> has an alt attribute with the text A cat.

My suggestion is to go a bit slower, analyzing what it is showing you in each step. It takes time, patience and practice.

understood. Thank you.
Although, I wish they could add highlighted notes that could let the students know signs(=,<,_, etc), capital letters and spaces between the words REALLY matter…

I even tried to type <a target value_blank href="https://freecatphotoapp.com">cat photos</a> :joy:

the value has to go between quotes, it’s important! Maybe not here, it works the same, but more complex attributes may have characters in the value that will break things if you do not use the quotes

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