challenge step 13

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 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:

add
target="_blank"
in a element

Hello there @jamulcah welcome to the FCC community.
Something to take note of when asking a question or seeking help is try as much as possible to let people know what your problem is or what you have tried so you can get help much faster.

I believe your challenge is adding a target attribute to the anchor tag. Adding attributes can be done inside of the starting tags of the specific HTML tag that requires it.

For instance the href is an attribute and it is included in the <a href=''> so all you need to do is add a space and add the second attribute as requested in the challenge which is the target attribute and set that attribute equals to a given value _blank.

Happy coding :+1:!

still struggling to understand, i think im struggling with the terminology and where its asking me to imbed _blank

Okay. I’ll try to break it down for you. First forget about the word “imbed/embed” all you’re required to do in simple terms is “add” a new attribute to an existing HTML element.

Detailed Explanation:

Here is an anchor tag with an attribute (href):

<a href="https://freecatphotoapp.com">Cat Photos</a>

  • The anchor tag <a> like many other elements requires a closing tag </a>. Whenever we need to add attributes to HTML tags like these (with opening and closing tags) we always add the attribute in the first/opening tag. In this instance the first tag is <a>.

  • The anchor tag above has an attribute inside of it which is the href (which specifies the URL of the page the link goes to) which makes the anchor tag a link.

  • The href needs to be set to a certain value for this anchor tag to be useful and we set the value by adding ="" to the attribute and we place that value in between the quotes (" ") like this: href="https://freecatphotoapp.com" .

  • Now if you want to add another attribute like the href to that same anchor tag or any HTML tag, you’ll need to separate the next attribute with a whitespace like this:

<a href="https://www.google.com" second-attribute="attribute value"></a>
In the example above the href is the first attribute and the next attribute is also added after a whitespace/space and we set it equal to it’s own value.

  • In the challenge you were given, the href has been provided you just need to add a space after that and then add a new attribute which is target and the value for that will be "_blank".

This was a long read and I hope this helps. Happy Coding :+1:!

thank you very much!

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