Learn HTML by Building a Cat Photo App - Step 12

Tell us what’s happening:

Hello, everyone.
I have a problem with solving the task - printing a link to photos with cats.

I follow all the instructions - it doesn’t work. I read other topics - I don’t find any errors in my code. I described some options and it doesn’t work.
Please someone tell me where I am wrong. :roll_eyes:

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 cat photos in our gallery<a href="https://freecatphotoapp.com/">cat photos</a></p>
      <a href="https://freecatphotoapp.com">link to cat pictures</a>

<!-- User Editable Region -->

      <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/124.0.0.0 Safari/537.36

Challenge Information:

Learn HTML by Building a Cat Photo App - Step 12

Only >>> cat photos<<< in the link

:roll_eyes: Ok,how to do it?

take a look at the example code they gave you

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

you see how freeCodeCamp is wrapped in anchor tags

<a href="https://www.freecodecamp.org">freeCodeCamp</a>

you need to do something similar for this step.

here is your paragraph where you need to make changes

you need to turn cat photos into a link

wrap those words inside a pair of anchor tags and set the href attribute to https://freecatphotoapp.com


I cannot understand You,sorry.I tried every combination is not working.

You figured out how to wrap the anchor tags around the words cat photos.

but read back the sentence out loud

Right now it says

See more in our gallery cat photos.

That doesn’t make sense.

Reset the lesson.
you should not move cat photos at all.
Place the anchor tags around the words cat photos and it will pass

You will know if you did it correctly if you see this result in the preview window

Screenshot 2024-04-29 at 12.21.08 PM

1 Like

Also, in the future please write your code directly in the forum
it will be easier to test your code that way

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 (').

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


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


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

It doesn’t work, it doesn’t work at all. I don’t know, probably I’m very stupid and I can’t understand you.Please write me the code how it should look, since I can’t figure out what’s going on.

<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->
 <p>See more <a href="https://freecatphotoapp.com" cat photos</a> in our gallery </p>
      <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>

You have an issue here, your opening tag is missing a lot of it. An opening tag is like <a> and then you add the attribute you need to it <a href="...">

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


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



Hi.
I tried both ways,it`s not working.

Where must be this <a>?

Is easier to write the piece of code and i will try ,like that i will understand where i wrong.

this is the better of the two, just for a question of spaces, but you have an extra opening tag, as you have only one a element, only one opening tag, the one that already contains the href is a good choice

Now I tried this code you quoted - it doesn’t work.

I restarted the exercise, copied the code you quoted - it doesn’t work.

In the screenshot it shows what error it gives.

I’ve tried various combinations and it doesn’t work.

Also, I copied another person’s solution and pasted it - still doesn’t work.

It’s not possible, I’m writing Python code without notice and I can’t write a single line of HTML.


Hello!
Reset your code, then:
In your p element, directly before the text cat photos add your a element with your href with a value of https://freecatphotoapp.com
Then directly after the text cat photos add your a closing tag.
Do not add any additional text or elements and ensure that you have only 1 space in your a element, that is the one in-between the text cat and photos
Example: <p>I think <a href="https://www.freecodecamp.org">freeCodeCamp</a> is great.</p>

So the first image… you have <p>See more <a cat photos </a> <---- Not correct, <a is not closed and also cat photos are not parameters for this tag… it can take a href = “” which is the link you want to send the browser to.

Second image you have <p>See more<a> <— Useless anchor tag…

So in both images you did not put the required code

I am going to suggest you find a website in your native language that can better explain the steps to you I am thinking it might be a language barrier. Programming and learning new concepts is hard enough I can only imagine how hard it is in a second language.

One thing to note is tags in HTML can have things like an id =“” or a class = “” sometimes they have things like src = “”.

These will always be inside the tag…

Example

<p>This is a link to <a href = "https://www.google.com">Google</a>.</p>

This will have a Paragraph element <p> </p> as the parent inside this Paragraph element you have an Anchor tag <a href = "https://www.SomeLinkHere.com">Text To Turn Blue</a>. This Anchor tag is surrounding the text Google. It is important to note here that white space are relevant… meaning if I put like 10 spaces after <p>This is a link to it will put 10 empty spaces on the webpage.

Finally.
This is the correct syntax:

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

This is what I wanted from you, to write the line for me literally, with the text from the task, and not to give me examples with other expressions.

Two days, you can’t tell me one simple example, one line.

Instead, only unclear explanations and repeating the same things that do not help at all.

You just had to write me that line and that’s it….
Native language… :person_facepalming:

Thank you all.

2 Likes

I am glad that you go it working.

The forum’s policy is to not give out answers.
That is why we give you hints and other examples.

We understand that learning to code is hard and can be frustrating at times.
But it is all part of the learning process and will make you a strong developer in the end.

1 Like

I restarted the exercise, copied the code you quoted - it doesn’t work.

HI @vokezpatt !

Welcome to the forum!

If you have a question about a specific challenge as it relates to your written code for that challenge and need some help, click the Ask for Help button located on the challenge (it looks like a question mark). This button only appears if you have tried to submit an answer at least three times.

The Ask for Help button will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.

Thank you very much :hugs:

Write this code when i write it this works.
the code is
``

See more cat photos in our gallery.


link to cat pictures`


Mod Edit : Solution removed



I hope this works