Learn HTML by Building a Cat Photo App - 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_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/103.0.0.0 Safari/537.36

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

Link to the challenge:

You would add a target attribute the same way you added the href attribute to the link, first the name of the attribute, then an equals sign, then the value for the attribute wrapped in quotes. An element can have more than one attribute/value pair. Just make sure to separate them with a space.

I don’t understand this at all. where can i go to learn what ‘target’ means? I need more help please

Do you understand how you added the href attribute to the a tag?

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

href is the name of the attribute and https://freecatphotoapp.com is the value of the attribute.

It works the same with with any attribute, regardless of the name. So in this case target is the name of the attribute and _blank is the value. You would use the same format as for the href attribute:

name="value"

Just make the necessary replacements for name and value. Add it either before or after the href attribute.

so I need to add target=“_blank” in between <a and href? like two instructions after the <a ?

Yes, that will work, you can add target="_blank" either before or after the href attribute (that includes the value for href). Order of attributes doesn’t matter.

oof thank you so much. target and href are names and what comes after the=is the value. this will take me a while to get the hang of but thank you so much for helping me out

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