Not being able to get past level 12

Tell us what’s happening:
After inputing the required code, it still showed error

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 href="http://freecodecamp.org"target="_blank">Cats photos
</a>
</p>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36.

Challenge: Nest an Anchor Element within a Paragraph

Link to the challenge:

Why do you have two <a> elements?

The boilerplate code has the <a> element created for you. All you need to do is wrap a <p> element around it.

Sorry, “boilerplate” I really don’t get that please.

Its just 2 elements the first for “cats photos” and the second supposed to be for the link to “view more…” which is already nested in

You have some code outside of the main tag. You need to cut it out and replace the first anchor tag with it.

okay…thanks, but I just did now and its still showing error

<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>View more 

  <a href="http://freecodecamp.org"target="_blank">Cats photos

  </a>

</p>

</main>

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.

Please 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.

markdown_Forums

Done all I could but cant get past it

In your code there are two <a> elements. One links to http://freecatphotoapp.com and the second one to http://freecodecamp.org.
Step 1: You can delete the second <a> element (the one which has the link to .org) and the <p> inside which it is contained.
Step 2: You have to nest the first <a> element inside a <p> element and include the “View more” text with a space after it.

Its stated their in the instructions

a. You should have an a element that links to “http://freecatphotoapp.com”.

Passed

b. Your a element should have the anchor text of “cat photos”

Passed

c. You should create a new p element around your a element. There should be at least 3 total p tags in your HTML code.

d. Your a element should be nested within your new p element.

Passed

e. Your p element should have the text "View more " (with a space after it).

Passed

f. Your a element should not have the text “View more”.

Passed

g. Each of your p elements should have a closing tag.

Passed

h. Each of your a elements should have a closing tag.

Now I am stalk at “d”

2 Likes

Yes, the <a> element with a link to the freecatphotoapp.com is in the instructions and it is already in your code which is good. This one has to be nested inside a <p> element with the View more text and space after it.

There is no need for the <a> element with the href to freecodecamp.org website.

Thanks alot…finally got it