Learn HTML by Building a Cat Photo App - Step 12

Tell us what’s happening:

It says The text inside your anchor element has extra leading or trailing whitespace. The only space in the anchor text should be between the word cat and the word photos.

Your code so far

<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->

<!-- User Editable Region -->

      <p>See more <a href="https://freecatphotoapp.com"<a> cat photos<a>in our gallery.<a></p>

<!-- User Editable Region -->

      <a href="https://freecatphotoapp.com">link to cat pictures</a>
      <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 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36

Challenge Information:

Learn HTML by Building a Cat Photo App - Step 12

Hey there. I believe you should look at the example some more and tell me what’s different in regards to how the link is set up.

<p>I think <a href="https://www.freecodecamp.org">freeCodeCamp</a> is great.</p>

Welcome to the community @gavin.williams!
I’ve gotten caught up on this in the past as well lol, when you put your answer in look to the results in the preview window and see what’s highlighted and make the correction off of that, make sure all the spacings are correct. Hope this helps🙂

1 Like

Hi there and welcome to our community!

You have some syntax errors in your code.
Here’s an example of how to create a link within a paragraph element:

<!-- text without link -->
<p>Please visit my website for awesome content</p>

<!-- 'my website' turned into a link -->
<p>Please visit <a href="example.com">my website</a> for awesome content</p>

Note that you simply enclose the required portion of text between opening and closing anchor tags, with the href attribute within the opening tag.

1 Like

Anchor (a) elements use this syntax

<a href = "freeCodeCamp.org"></a>

You are using it nested in a p element, so its syntax should look like this.

<p> I use <a href = "freeCodeCamp.org">freeCodeCamp</a> a lot to learn programming </p>

The example should output “I use freeCodeCamp a lot to learn programming” into the preview.

Happy Coding

1 Like

thanks all of you i fiqured it out

3 Likes