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.
I’m trying to understand what a target attribute is, how to use it, and how to install it with instructions given. Any help would be greatly appreciated.
**Your code so far**
<!-- 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/101.0.4951.67 Safari/537.36
So first off, target is an attribute not an element. An element is a… like an object within the HTML. An attribute is something that modifies and helps define something about that object.
Now the target attribute decides were to open the link that the anchor tag you clicked is pointing to. If you click the link, were does it open in your browser? And _blank tells it to open it in a new tab.
You can add just like any other attribute in an element. It sits inside the elements opening tag:
Following this example now you only have to understand the difference of elements and attributes. Where element put your anchor <a>. The href in your code is an attribute. Meaning it modifies your element which is the anchor. And as we see it;s included in the opening tag.
All in all that’s something fundemental to understand. Hope it helps.