Basic HTML and HTML5 - Nest an Anchor Element within a Paragraph

Tell us what’s happening:
Describe your issue in detail here.

Your code so far

<h2>CatPhotoApp</h2>
<main>

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

  <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" 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</p>
</main>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0

Challenge: Basic HTML and HTML5 - Nest an Anchor Element within a Paragraph

Link to the challenge:

Welcome to our community!
Don’t change the given code. Just add wrap the text “cat photos” with ‘a’ tags:

<p>First part of the text <a href="URL">cat photos</a>.<p>

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

I see that currently, one of the test cases is not passing.
Failed:Your aelement should be nested within your new p element.

The new <p> tag that you created should have the exact words “View more cat photos” as that is a requirement to pass the test case.

The challenge also wants you to include the anchor tag( in line 3) inside the new <p> tag you created. If you include that line in the new p tag along with the “View more cat photos” text, you should pass the challenge.
Good Luck!

Solution:

<h2>CatPhotoApp</h2>
<main>

<!-- Copy and paste this in the new p tag -->
<!--
  <a href="https://www.freecatphotoapp.com" target="_blank">cat photos</a>
-->

  <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" 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>

  <!-- NEW <p></p>tag  */ -->
  <p>View more cat photos
  <!-- Paste <a></a> tag here -->
  <a href="https://www.freecatphotoapp.com" target="_blank">cat photos</a></p>
</main>

Thank you for your advice. Actually, in this case, I didn’t solve anything. In the code that kevry20220100025 has posted, there is no paragraph at all and certainly, he should guess what is the “First part of the text” that I put instead of the existing one in the step. It was just my assessment that this approach can help in this particular situation. Anyway, I will take into account what you have said.

1 Like

Hey! I had a conversation with my fellow moderators and your post has been restored.

However i would still advice you to try to help other users in getting to a solution with explanations, examples and even links to external resources if necessary.

In my humble opinion, you should try to keep the explanations descriptive and long enough to get the point acrooss and abstract enough that the user understands the concept and can implement that concept regardless of the context which will provide a lot of value to their learning experience.

2 Likes

You are right. Sometimes, the best intention isn’t enough. The realization is what counts. My approach to helping my colleagues here in “freeCodeCamp” isn’t optimal every time, for now. I am sure it will be better as time goes by.
Thank you for your advice, once again.

1 Like

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