One a element and element should link to

Hello guys I’m not sure what i am doing wrong here. I keep getting a error that says :

You should only have one a element.

The a element should link to " https://www.freecatphotoapp.com ".

if someone could please point out my mistake or the correct way to enter the code.
Thank you !


<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>
</main>
<p>view more <a target"_blank" href="https://www.freecatphotoapp.com"> cat photos</a> 
</p>
  **Your browser information:**

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Safari/605.1.15

Challenge: Nest an Anchor Element within a Paragraph

Link to the challenge:

Hi @Twowheelrahim !

Welcome to the forum!

I would reset the lesson.

Nest the existing a element within a new p element.

This is the existing a element they are talking about.

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

You are supposed to wrap your p tags around that one.
Not create a new one.

Hope that helps!

1 Like

Thank you for the quick response here’s what I just tried after resetting the lesson and it did not accept the code.

It states that You should only have oneaelement. Theaelement should link to “https://www.freecatphotoapp.com”.

It is hard to tell with just a screenshot.

Please post your full code in the forum.

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 (’).

Appreciate the tip sorry just getting use to everything.

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

It would be nice to see the full code.

Based on the error messages, it looks like you still have two anchor elements.

That is why we need to see the full code to make sure :grinning:

hopefully this is better

<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>
</main> 
<p> View more <a href="https://www.freecatphotoapp.com"target="_blank">cat photos</a></p>

I see two a elements.

1 Like

There is still a misunderstanding about the first part of the instructions.

You keep creating a new anchor element here

But the instructions say to use the existing element they already gave you.

Make sense?

You are not supposed to have two anchor elements.

Just one.

Hope that is clearer now.

2 Likes

I seriously appreciate both of your guys help I do not know how I missed that. I finally got it !

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.