Learn HTML by Building a Cat Photo App - Step 10

Tell us what’s happening:
I get this error
Your anchor (a) element does not have an href attribute. Check that there is a space after the opening tag’s name and/or there are spaces before all attribute names.
when I write this part a = ‘https://freecatphotoapp.com’ a
what changes should I make?

  **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> = 'https://freecatphotoapp.com' </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>

Hello!

Since href is an attribute of the anchor element, you would include href in your opening anchor tag.

The anchor element and attributes are coded the same way you coded the img element with a src attribute:

<img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back.">

Notice that the img element has two attributes: a src attribute and an alt attribute.

So to fix this, add an href attribute inside your anchor tag (<a>) and set it equal to the same website URL you are using:

<a href='Insert URL here'></a>

I hope that helps! Good luck!

Thanks a lot! I put in the href attribute first but didn’t give any spaces in between, so I removed it. Had no idea I had to use spaces.