Debug a Pet Adoption Page - Debug a Pet Adoption Page

Tell us what’s happening:

  1. Your a element with the text Visit cats page needs to have an href attribute instead of a src attribute.

Your code so far

<h1>Welcome XYZ Pet Adoption!</h1>
<p>Consider adopting a pet today. We have cats, dogs, rabbits and more.</p>

<h2>See our cats!</h2>
<img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/cats.jpg" alt="Five cats looking around a field. img>

<h2>Adopt a cat!</h2>
<a href=/"cats">Visit cats page</a>

<h2>Adopt a dog!</h2>
<a href=/"dogs">Visit dogs page</a>

Your browser information:

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

Challenge Information:

Debug a Pet Adoption Page - Debug a Pet Adoption Page

Look at the color highlighting in the code you’ve provided.

This syntax highlighting will help you discover errors in your code. See how element names are highlighted orange? If they aren’t orange there is some error to fix.

Welcome to the forum @muratdadas20100 !

Take another look at the last bullet point in User Story #1.

For your convenience, here is the original code you were asked to debug:

<img href="https://cdn.freecodecamp.org/curriculum/cat-photo-app/cats.jpg" att="Two tabby kittens sleeping together on a couch."></img>

Note - it is important to talk about how you are stuck fixing the error instead of just posting the error message. This helps us help you, and communication is an important part of coding

Hi Buddy, Here your this is line of code is working for me.

In your code this is not the problem.

Hope You Understand

Hi,

Welcome to the forum @muratdadas20100 !

There are two mistakes in your code.

  1. Your element end tag is having syntax error. Question is to " *Remove the </img> closing tag because img elements are void elements and don’t have closing tags."

Check the syntax of how to close an img element. Here is an example,

<img src="/path" alt="description of the image" />

  1. Your anchor tag href is also having syntax error.

<a href="/path"> Text </a>

Fix these two issues, your code will work as expected.