Nest Anchor Element within Paragraph

Tell us what’s happening:

Don’t know what is happening. Says my a element does have “view more” element in it. View specific code here:

<p><a
    href="http://freecatphotoapp.com" </a></p>

  <p>target="_blank"> view more cat photos </p>

Your code so far


<h2>CatPhotoApp</h2>
<main>
  
  <p><a
    href="http://freecatphotoapp.com" </a></p>

  <p>target="_blank"> view more cat photos </p>
  
  <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>

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/604.5.6 (KHTML, like Gecko) Version/11.0.3 Safari/604.5.6.

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

1 Like

Have a re-read of the task carefully and look at where your link is placed.

Tell us what’s happening: Current code

<a href="http://freecatphotoapp.com"

target="_blank">view cat photos


What should I do? I’ve tried changing target="_blank">view cat photos which leaves me with

Your code so far


<h2>CatPhotoApp</h2>
<main>
  
 <p><a href="http://freecatphotoapp.com" </a>

target="_blank">view cat photos </p>
  
  <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>

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/604.5.6 (KHTML, like Gecko) Version/11.0.3 Safari/604.5.6.

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

your statement is not valid.
Here’s how you write an anchor tag

<a href="mylink" target="_blank">LinkText</a>

Thanks. Still doesn’t solve the problem:

Your a element should not have the text “View more”. My a element doesn’t appear to, at least, have that problem. But what should I do to correct code.

please update your code above to the latest one you are using

Hi, sorry, and thanks. If you’re interested in providing help {along with critique} please do so.
Other wise you can leave off commenting on my post. thanks again

You incorrectly copy pasted my text, which was: What should I do? I’ve tried changing target="_blank">view cat photos

What have you got so far?

excerpt of text that is relevant.

 <p><a
    href="http://freecatphotoapp.com" </a></p>

  <p>target="_blank"> view more cat photos </p>

Everything is correct except I don’t understand how to make the a element not have “view more cat photos”. Feel free to ask more qs

That’s ok I would rather walk you through it so you learn rather than just give you the answer like others

So the task is to
“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.”

Do you understand the bold bit?

So I revised to:

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

but it still says the a element has “view more”. I just have no idea what to do as i’ve tried so many combos already.

1 Like

Thank you! I just have. Not sure what else to do so it allows me to pass the tests.

Thanks, I definitely can. Here we go!:

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

still says the p element needs “View more” as text.

Still on the same problem, says the p element should have text “view more”. How should I solve this problem ?

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

You’ve got the link working again so you just need to pay attention to what the actual link text should say. I believe yours shows cat photos and you need slightly different text in there (the instructions tell you exactly what the link text should be…

Exactly. If the text is changed to what the instructions want/state, then it doesn’t pass tests still. =(

I appreciate all your guys’ patience. Just kept the code right underneath tag and still not passing the requirements of the challenge: "Your p element should have the text “View more " (with a space after it).”

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

Any suggestions? I would really want to move onto the next challenge.

ok here are the steps from the beginning. Please follow along carefully.

1- reset your code using the “reset” button provided in the challenge.
2- go to line number 4 which starts with <a href and place your cursor at the start of the line
3- very carefully add this code to the start of the line

<p>View more 

(Important Note: put a space after the word ‘more’ and before the <a)
4- put your cursor at the end of line # 4 and write

</p>

5- Check that line #4 looks exactly like the one that randeldawson provided in the previous post.
6- Click the Run button. If you see a check mark, submit the answer. If you don’t see a checkmark, return here and post all your code in between ``` backticks (one line above the code with 3 backticks and one line below the code with 3 backticks like this:
```
all the code goes here
```

I have double checked these steps multiple times so I know they work. All you have to do is follow…