Nest anchor element within the paragraph element

I Keep getting this error for the exercise concerning the element within the

element:

// running test
Your a element should be nested within your new p element.
Your p element should have the text "View more " (with a space after it).
// tests completed

Your code so far


<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>cat photos</a></p>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:62.0) Gecko/20100101 Firefox/62.0.

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/basic-html-and-html5/nest-an-anchor-element-within-a-paragraph

You need to wrap your new p element around the existing a element.

am i reading this wrong? because it says that the ‘a element should be nested within your p element’? In my head this meant like: <p><a></a></p>

Regardless i’ll try. Thanks Leslie

There is an a element above your image element. It should be nested in the p element.

WRITE LIKE THIS

<p>View more <a href="http://freecatphotoapp.com" target="_blank">cat photos</a></p>

1 Like

thank you Randell and Ariel. I appreciate it.

Thank you. I already figure it it out. Also please refer to what Randell had said. It would be more beneficial for the person if you give hints instead for the answer. However, I still appreciate your input.

I had issues with the tests for this lesson as well. My problem was that I didn’t understand that THERE CAN BE ONLY 1 element on the page. The instructions weren’t clear that I was to modify my existing element from the previous lesson rather than write a new one. So my new one was correctly nested, but the test wasn’t sophisticated enough to realize that. Instead it focused on the original unnested element at the top of my code. Once I figured that out and removed the original, it passed.

Thank true answer…