<h2>CatPhotoApp</h2>
<main>
<a href="http://freecatphotoapp.com" target="_blank">cat photos</a>
<img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back.">
<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
<p>
<a href="view more cat photos">cat photos</a>
View more
</p>...
</main>
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36.
Challenge: Nest an Anchor Element within a Paragraph
You should be using the same anchor tag, just with different anchor text. So you can just copy and paste what is in the anchor tag.
href="http://freecatphotoapp.com"
note that href should equal a URL not the text you want to be shown.
The text between the opening and closing anchor tags is what will be the linked text. So if you just copy and paste <a href="http://freecatphotoapp.com" target="_blank">"View more "</a> the text that will be displayed is ‘View more’
Make sure to read all of the instructions so you know where to place the anchor tag, as well as what to have as anchor text.
<p>
<a href="view more cat photos">cat photos</a>
View more
</p>
</main>
The challenge says
Now nest the existing a element within a new p element (just after the existing main element). The new paragraph should have text that says “View more cat photos”, where “cat photos” is a link, and the rest of the text is plain text.
So you need to move the p element outside of the existing main element. That could be another thing that is tripping you up.
You’ve got the correct text in between the opening and closing a tags, but the href attribute is wrong, and the target attribute is missing.
You’re close. Just a couple corrections and you’ve got it!
That’s not true, this code passes the test, and it has two anchor tags.
<h2>CatPhotoApp</h2>
<main>
<a href="http://freecatphotoapp.com" target="_blank">cat photos</a>
<img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back.">
<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
</main>
<p>View more <a href="http://freecatphotoapp.com" target="_blank">cat photos</a>.</p>
Now nest the existing a element within a new p element (just after the existing main element). The new paragraph should have text that says “View more cat photos”, where “cat photos” is a link, and the rest of the text is plain text.