Build a Cat Blog Page - Step 9

Tell us what’s happening:

I am stuck on step 9 due to an error telling me that I should have “Posts” as the text for my second li element. So I retyped it and made sure that had closing tags on all elements. But the error insists that I am doing it wrong.

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 peacefully sleeping"
        />
        <figcaption>Mr. Whiskers Sleeping</figcaption>
      </figure>

<!-- User Editable Region -->

      <nav>
        <ul>
          <li>
            <a href="#about">About</li>
          <li>
            <a href="#posts">Posts</li>
          <li>
            <a href="#contact">Contact</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/134.0.0.0 Safari/537.36

Challenge Information:

Build a Cat Blog Page - Step 9

even on the a elements?

do the a elements need one?

why should they not need one?

I thought that they were void elements.

they need to contain text, if they do not have a closing tag how can you say which text is inside the a element?

That makes since. I thought anchor elements were void elements! I’m so sorry thank you!

remember, if it needs to contain things it can’t be void

1 Like

I’ve added the closing tags on the anchor elements but it tells me the same thing is wrong.

So the forum can assist please post your full code.

Use the following method to post code to the forum:

  1. On a separate line type three back ticks.
  2. On a separate line paste your code.
  3. On the last line type three back ticks. Here is a single back tick `