Nest anchor element within the paragraph element

Nest anchor element within the paragraph element
0.0 0

#1

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


#2

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


#3

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


#4

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


#5

You are reading it correctly. But as @ArielLeslie points out, you already have an a element and per the instructions (seen below), you are supposed to be nesting the existing a element.

Now nest your existing a element within a new p element (just after the existing main element).


#6

WRITE LIKE THIS

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


#8

@SHEHBAZ_SOMJI Give hints or code examples similar to the final solution instead of just posting the final solution.


#9

thank you Randell and Ariel. I appreciate it.


#11

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.


#13

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.