Build a Cat Blog Page - Step 11

Tell us what’s happening:

I am Not sure what is wrong with my solution, it seems to be me h2 since the beginning isn’t being highlighted on dark text, but the prompt says the “Your section element should have an id set to “about””

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

<!-- User Editable Region -->

    <main>
      <section> <id="about"
      <h2>About</h2>
      </section>
    </main>

<!-- User Editable Region -->

  </body>
</html>

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Safari/605.1.15

Challenge Information:

Build a Cat Blog Page - Step 11

got the h2 to work by adding a less than symbol to the end of the id, but it still says the id is wrong

look at how you added the href attribute to the a element a few lines above, the id attribute is added in the same way

do you mean in the h2 element as well? I've got it outside the H2 and it doesn't work still.

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

<!-- User Editable Region -->

    <main>
      <section><h2><id="about">About</id></h2>
      </section>
    </main>

<!-- User Editable Region -->

  </body>
</html>

no, it should not go to the h2

but you have added attributes to other elements in the project, for example you have added the href to the a element, you can use that as an example

<section><id="about"></id>
            <h2>About</h2>
</section>

is this getting closer? I've tried this and it doesn't work either, and I am completely stumped

is it similar to what you did here?

there isn’t such a thing as an id element, you need to add an id attribute

what makes the id an element or an attribute? if it needs to be connected to something else to be an attribute or within something else I'm not sure how to make that happen. To me the id does seem similar to the a href, just telling me to make it like that repeatedly hasn't helped so far I don't know how to make it moe like that.

in the lecture where they talk about ids and classes they are contained within h1 elements, and when I've set them up inside the h2 that still didn't work.

an id element does not exist, you do not write <id>

you can give attributes to any element, the schema is <elementName attributeName="value">,

which is the schema you used to add an href attribute to an a element

now you need to add an id attribute to a section element.

<id="about"></id>

so how is this marked as an element then? the LT symbol isn't at the beginning its at the end of the attribute value just like in the href, the only reason the closing id tag is there is because the h2 doesn't get counted without ut there?

that is not what you should write, id is the attribute name not the element name

<elementName attributeName="value">

so what element should it be inside? the h2? you already said it shouldn’t go to the the h2, so the only other thing it can be inside of as an attribute too would be the section right? is that not what I have? what exactly is wrong with what I have?

you have written
<id="about"></id>

which does not match
<elementName attributeName="value">
becuase id is not an element name

you need to add the id to the section element

this solution worked for me.



      
          

About

hi @giriaashish

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. How to Help Someone with Their Code Using the Socratic Method

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.