Learn HTML by Building a Cat Photo App - Step 15

Tell us what’s happening:
Learn HTML by Building a Cat Photo App - Step 15.

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 <a target="_blank" 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." <a href="https://freecatphotoapp.com"></a>
    </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/102.0.5005.124 Safari/537.36 Edg/102.0.1245.44

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

Link to the challenge:

1 Like

:balloon: Hi, welcome to the forum!
We see you have posted some code but did you have a question?

1 Like

Remember, every tag starts with a < and ends with a >. Does your img tag have both?

Also, to turn something into a link you need to wrap it with the a tags, just like you did to the words “cat photos” in the p element.

1 Like

Just read the question again. The question wants you to turn the image into a link, which means, once you click the image, it will go to a new page. So what we did in the former steps? We used

<a href="somelink">a sentence or a word</a>

right? Try to change the inner part as the image, and see what you got.

3 Likes

Cool, I will try to reedit my answer to make it not so obvious.

3 Likes

Hey I am really sorry. Your suggestions were pretty good. What I meant to say was I have formatted your code because it lacked formatting.

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

Sorry for my bad English comprehension ability :frowning: , I am going to read the the link. Thanks for sharing.

Naah Naah don’t worry about it. Thank you for taking the time out of your daily lives to help people on the forum. It means a lot. Keep it up. :smile:

Your “img” element should be nested into an “a” element.

10 posts were split to a new topic: Cat photo app step 15 help

Hi, I’m stuck on step 15. I’ve just copied the code from this post after getting stuck and that doesn’t work. I get the message ’ Your anchor (a ) element should have an opening tag. Opening tags have this syntax: <elementName> .
Here is what I put:
<img src=“https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg” alt=“A cute orange cat lying on its back.”
Thanks.

Hey! Please create your own topic when you have specific questions about your own challenge code. Only respond to another thread when you want to provide help to the original poster of the other thread or have follow up questions concerning other replies given to the original poster.

The easiest way to create a topic for help with your own solution is to click the Ask for Help button located on each challenge. This will automatically import your code in a readable format and pull in the challenge url while still allowing you to ask any question about the challenge or your code.

Thank you.

You forgot to close img’s element tag.

You might try the following :
mod edit: solution redacted

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

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.