Build a Cat Blog Page - Step 5

Tell us what’s happening:

I keep getting your second anchor element should have the text of Posts inside your second li element. From what im seeing it looks correct. Any feedback would be helpful

Your code so far

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Mr. Whiskers' Blog</title>
    <meta charset="UTF-8" />
  </head>
  <body>
    <header>
      <h1>Welcome to Mr. Whiskers' Blog Page!</h1>
      <figure>
        <img
          src="https://cdn.freecodecamp.org/curriculum/css-photo-gallery/1.jpg"
          alt="a cat in the garden"
        />
        <figcaption>Mr. Whiskers in the Garden</figcaption>
      </figure>

<!-- User Editable Region -->

      <nav>
        <ul>
          <li> <a href="#about"> About </li>
          <li> <a href="#posts"> Posts </li>
          <li> <a href="#contract"> Contract </li>
        </ul>
      </nav>

<!-- User Editable Region -->

    </header>
  </body>
</html>

Your browser information:

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

Challenge Information:

Build a Cat Blog Page - Step 5

Anchor (a) elements are not self-closing. They each need two tags.

Also it’s a good habit to avoid unnecessary spaces in/around your elements:

<!-- like this -->
<li><a href="#example">Example</a></li>

<!-- not like this -->
<li> <a href="#example"> Example </a> </li>
2 Likes

Thanks for clearing that up i always thought by putting “>” it would close the tag but that worked.

1 Like

Some elements are self closing (e.g. img, input) but most require both an opening and closing tag (e.g. li, a, p etc).

1 Like