Is run test incorrectly analyzing my code?

Is run test incorrectly analyzing my code?
0

#1

I’m only a couple of lessons in, but I’m on a lesson where I have to nest my “a” element within a “p” element and run test seems like it is incorrectly testing my code as it’s telling me “Your a element should be nested within your new p element.”

The instructions for the lesson are:
“Now nest your 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.”

Is the following code not doing exactly that?

<h2>CatPhotoApp</h2>
<main>
  <p>
    View more <a target="_blank" href="">cat photos</a>
  </p>
  
  <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>

If I remove the second “a” element, run tests gets angry at me. Not really sure what more it wants out of me.

EDIT: I should also ask while I’m here, is it possible to skip lessons when this sort of situation arises?
Thank you!


#2

Add this anchor element into the <p></p> tag after the words View more, you are missing the link in your href="", there should be only one anchor element and that should be inside p tag


#3

There are some lessons with bugs, in that case you can skip it, but make sure you ask someone about it in the forum before skipping it, in this case there is no bug, you just have to add the url to your href=""


#4

I had the exact link in there before and it still wasn’t working. What I’ve found after messing with it is that “target” had to be after “href”. Which is odd, since in the example shown in the lesson, the element was written as:

<p>
Here's a <a target="_blank" href="http://freecodecamp.org"> link to freecodecamp.org</a> for you to follow.
</p>

Doing it that way prevented the test from working.


#5

No, we can place the target at front, in your recent post, the text for paragraph and the anchor elements are changed, so it won’t pass, you should provide the exact way it asks in the test,
<p>View more <a href="" target="">cat photos</a></p>, it must be like this
Note: I tested it and it passed


#6

Hm, ok, noted. Thanks for the help.