Ive started the course today and its bout HTML and web making

ive been confused about a step in the anchor attribute placement
i cannot understand this
“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.”

  **Your code so far**

    <h2>Cat Photos</h2>
    <!-- TODO: Add link to cat photos -->
 <p>Click here to view more <a="_blank"><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/101.0.4951.64 Safari/537.36 Edg/101.0.1210.53

Challenge: Step 13

Link to the challenge:

In HTML you have elements, attributes, and values. These three things are mentioned a lot in these courses and understanding them will help you to describe problems and understand what instructions are saying.

An element is something you are familiar with even if you didn’t know the name. Things like the <body> and <p> are elements.

Attributes are what get placed inside the opening brackets of an element. For example, id and class are attributes.

All attributes are assigned what is known as a value. For example, id="example-id" and class="example-class"

These would get combined together like so:

<p id="example-id">This is a paragraph with an example id attribute with the value of example-id.</p>

<p class="example-class">This is a paragraph with an example class attribute with the value of example-class</p>
1 Like

You have two anchor elements here, you will have to delete the first one.
Then add the target attribute with the value of "_blank".

If you have a doubt on the syntax of an attribute, @Alabastor has explained above.

1 Like

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