Est an Anchor Element within a Paragraph

Tell us what’s happening:
Describe your issue in detail here.

  **Your code so far**

<h2>CatPhotoApp</h2>
<main>

<a href="https://www.freecatphotoapp.com" target="_blank">cat photos</a>

<img src="https://www.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>View more cat photos</a>
</p>
</main>
  **Your browser information:**

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36.

Challenge: Nest an Anchor Element within a Paragraph

Link to the challenge:

The instructions say:

Nest the existing a element within a new p element.

So instead of adding a new <a> as you have done at the bottom you want to nest the existing <a> in a <p>. You might want to click the “Reset All Code” button to get a fresh start.

1 Like

So on line 10 for the code, on that challenge do I write this because I’m a little confused

<p>View more <a href="http://www.freecatphotoapp.com"> cat phots</a></p

Because I wrote that and it’s still showing error

Line 10 is </main>. What line is the existing <a> on? That is the element you want to wrap with a <p>.

1 Like
<h2>CatPhotoApp</h2>
<main>

 <a href="https://www.freecatphotoapp.com" target="_blank">cat photos</a>

 <img src="https://www.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>View more <a href="http://www.freecatphotoapp.com"> cat phots</a></p>
 -->
</main>

I comment the line I wrote


So this is what my code looks like so far

For future reference, instead of screenshots, copy/paste your code in here and wrap it with three backticks (three backticks before the code and three backticks after the code).

Again, I would recommend you click the ‘Reset All Code’ button to get a fresh start. What line is the existing <a> on? That is where you want to add the <p>.

Hint: Do not change anything about the existing <a>. All you are doing is adding tags/text around it.

1 Like

Thank you so much sir the code was written on line 4 and then I added
<p> View more </p> on the code now it looks like this : <p> View more <a href="https://www.freecatphotoapp.com" target="_blank">cat photos</a> </p>
And It worked thank you so much for explaining it !

I’ve edited your post 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 (’).

1 Like