Learn HTML by Building a Cat Photo App - Step 13

Tell us what’s happening:
Describe your issue in detail here.

How do I add the target attribute with the value _blank to the anchor element?
Your code so far

    <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.">
  **Your browser information:**

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

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

Link to the challenge:

You would add it the same way you added the href attribute with the value https://freecatphotoapp.com to the anchor element. The attribute name goes on the left side of the equals sign and the value goes on the right side of the equals sign surrounded in quotes. And element can have more than one attribute/value pair. Just make sure you separate them with a space.

(post deleted by author)

To display your code in here you need to wrap it in triple back ticks. On a line by itself type three back ticks. Then on the first line below the three back ticks paste in your code. Then below your code on a new line type three more back ticks. The back tick on my keyboard is in the upper left just above the Tab key and below the Esc key.

You would add target="_blank" to the a tag just like you added the href attribute to the a tag. A tag can have more than one attribute.

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