Don't know what I'm doing wrong

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

I made cat photos a link, but they keep telling me I can only use one (a) element or to double check spacing and spelling…

  **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"</p>
    <a href="https://freecatphotoapp.com">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.">
  </main>
</body>
</html>
  **Your browser information:**

User Agent is: Mozilla/5.0 (Linux; Android 11; SM-S124DL) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Mobile Safari/537.36

Challenge: Step 12

Link to the challenge:

The link needs to be inside the p element. You have added it after the p element. The sentence on the page should read “Click here to view more cat photos.” but the words “cat photos” in that sentence should be a link.

Okay, now it says the anchor (a) element and p element needs to be nested…? I don’t know what that means…

Nesting an element means placing an element inside of, or within another element. For example, you can see from the HTML that the main element has several other elements inside of it. Those elements are nested within the main element. You will do the same thing with the link. You nest the a element inside of the p element.

If you need further help, you’ll need to paste your current HTML in here so we can see what you have done. To display your code in here you need to wrap it in triple back ticks. On a line by itself type three back ticks. Then on the first line below the three back ticks paste in your code. Then below your code on a new line type three more back ticks. The back tick on my keyboard is in the upper left just above the Tab key and below the Esc key.

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

I’m sure I’ve completely messed the code up… I don’t, it’s telling me i can only have one (a) element now…?

I’d restart the step again to get the original code back. Look closely at the existing link below the p element:

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

Do you see how the link is composed of an opening a tag that has an href attribute set to the URL? And then link ends with a closing a tag? In the middle of those tags are the words that you want in the link.

You will do the same thing to the words “cat photos” in the p element. You don’t need to change any of the existing words or tags in the p element. You only need to add the opening and closing a tags around the words “cat photos” to make them a link.

I think i did what you said,…

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

But its still saying - Your code should only contain one anchor (a ) element. Remove any extra anchor elements.

We need to be able to see your actual HTML in order to see what you tried and help you.

Please follow the instructions I gave you above to paste your HTML in here so we can see it.

@Page250

I’ve edited your post for readability. 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 (').

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

You are getting closer. That isn’t the URL you want to use for the href though. The link below the p is:

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

You want to use this URL for your new link in the p element. Also, look at the words “cat photos” in the above link. See how they are between the opening and closing a tags. That’s what you want to do for your new link as well.


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

If you want us to see that you have replied to one of our message then you need to click the “Reply” link on our message.

Look again at the original link below the p element:

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

Does yours look like that? Remember, you are creating the exact same link using the words “cat photos” in the p element.