Im not really sure how or where to add a target attribute with the value _blank to the anchor (a ) element’s opening tag. Do I literally put the word ‘_blank’ within the “<a”?
This is my first day at coding and I already feel dumb and stuck…
Describe your issue in detail here.
Your code so far
<html>
<body>
<main>
<h1>CatPhotoApp</h1>
<h2>Cat Photos</h2>
<!-- TODO: Add link to cat photos -->
<!-- User Editable Region -->
<p>See more <a _blank href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>
<!-- User Editable Region -->
<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/122.0.0.0 Safari/537.36
You appear to have created this post without editing the template. Please edit your post to Tell us what’s happening in your own words.
Learning to describe problems is hard, but it is an important part of learning how to code.
Also, the more you say, the more we can help!
Yes, you have to use the string _blank but as the value (the text belonging) to the attribute target. If you are not confident yet about the word attribute, then look below, there’s another attribute named alt
<p>See more <a "target=_blank">cat photos</a> in our gallery.</p>
<p>See more <a target=_blank href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>
I finally got it. But I had no clue I needed to use the ‘=’ sign. Also, i didnt really understand where in the opening tag I needed to insert the attribute and the value. this is so complicated…
edit: the lesson does not teach me about the usage of ‘=’ ;-;
All img elements should have an alt attribute. The alt attribute’s text is used for screen readers to improve accessibility and is displayed if the image fails to load. For example, <img src="cat.jpg" alt="A cat"> has an alt attribute with the text A cat.
My suggestion is to go a bit slower, analyzing what it is showing you in each step. It takes time, patience and practice.
understood. Thank you.
Although, I wish they could add highlighted notes that could let the students know signs(=,<,_, etc), capital letters and spaces between the words REALLY matter…
I even tried to type <a target value_blank href="https://freecatphotoapp.com">cat photos</a>
the value has to go between quotes, it’s important! Maybe not here, it works the same, but more complex attributes may have characters in the value that will break things if you do not use the quotes