Zezo55
November 1, 2022, 5:57pm
1
Tell us what’s happening:
Describe your issue in detail here.
How can I add target attribute
Your code so far
<html>
<body>
<main>
<h1>CatPhotoApp</h1>
<h2>Cat Photos</h2>
<!-- TODO: Add link to cat photos -->
<p>Click here to view more <a href= _blank"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 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Safari/605.1.15
Challenge: Learn HTML by Building a Cat Photo App - Step 14
Link to the challenge:
target is an attribute just like href is an attribute so you would write it next to href (but on the left not on the right as you did)
Zezo55
November 1, 2022, 6:12pm
3
I’m still stuck in this step.
<p>Click here to view more <a _blank href="https://freecatphotoapp.com">cat photos</a></p>
I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>
) to add backticks around text.
See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').
so far you have added the value of the target attribute “_blank” but you haven’t actually added the word target yet.
target is just like href.
you write the word target=
and then the value
Zezo55
November 1, 2022, 7:18pm
7
<a herf="https://freecatphotoapp.com"
<img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg"
alt="A cute orange cat lying on its back.">
The hint says I should only add one opening anchor (a) tag
1 Like
is this the same step? you mispelled href
Zezo55
November 1, 2022, 7:24pm
9
I’m now in the step 15
how to turn the img into link
hbar1st
November 1, 2022, 8:01pm
10
please use the ask for help button to get help for the new task and mark this one as solved by choosing a post as a solution
system
Closed
May 3, 2023, 8:02am
11
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.