Learn HTML by Building a Cat Photo App - Step 12

Tell us what’s happening:
Describe your issue in detail here.
“The link’s text should be cat photos . You have either omitted the text or have a typo.”
coming this error.

  **Your code so far**
<html>
<body>
  <h1>CatPhotoApp</h1>
  <main>
    <h2>Cat Photos</h2>
    <!-- TODO: Add link to cat photos -->
    <p>
      Click here to view more cat photos.
      <a href="https://freecatphotoapp.com">
        cat photos
      </a>
    </p>
    
    <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back.">
  </main>
</body>
</html>
  **Your browser information:**

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

Challenge: Learn HTML by Building a Cat Photo App - Step 12

Link to the challenge:

<p>
      Click here to view more cat photos.
      <a href="https://freecatphotoapp.com">
        cat photos
      </a>
    </p>

In your code you are having 2 text cat photos.
if you delete the cat photos in Click here to view more cat photos. your code would run.

where should i remove text whether its in <p> tag or <a> tag
please tell me

[Mod edit: edited for readability]

Please use ctrl + E to format your code or else it won’t show up in the output.Preformatted text

where should i remove text whether its in
p tag or a tag
please tell me

you should remove it from the p tag

After nesting the anchor (a ) element, the only p element content visible in the browser should be Click here to view more cat photos.
but its suggesting we have to add text in p tag

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.

step-12

for this code it showing hint like this,

After nesting the anchor (a ) element, the only p element content visible in the browser should be Click here to view more cat photos. Double check the text, spacing, or punctuation of both the p and nested anchor element.

but iam checked every spacing still cant figure it out.

Your text needs to be exactly Click here to view more cat photos. along with punctuation and spacing. Are you sure its this?

step-12

now copied text exactly what given in hint still its not working.
tell me where iam missing.

Are you sure the . is in the right place? it needs to be right after the closing a tag.

step-12

now showing like this

The link’s text should be cat photos . You have either omitted the text or have a typo.

Great! you’re really close, now move the . to after the </a> so its a part of the p tag but not the a tag.

1 Like

After removing the dot its working thanks for your suggestion.

the challenge expects that after adding the link to the text, your text
it comes out as Click here to view more photos.

eg

<p>I am a <a href="https://">free man.</a></p>

this code will come as: I am a free man. the text free man would be a link
You’re expected to do same for Click here to view more photos.

also ensure that there’s a space before your a element. but no spaces between your a element and cat photos.

1 Like

In the original post, the . is not part of the a element which is causing them to fail their tests

2 Likes

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