Learn Basic CSS by Building a Cafe Menu - Step 12

h1 Step 12

You can add style to an element by specifying it in the style element and setting a property for it like this:

element {
 property: value;
}

Center your h1 element by setting its text-align property to the value center.

Am confused on the wording “Center your h1 element by setting its text-align property to the value center.”
I don’t know where to put the h1 element.

  Code so far
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8" />
  <title>Cafe Menu</title>
  <style>
   <h1>
   element {property: value;
   }
   </h1>
  </style>
</head>
<body>
  <header>
    <h1>CAMPER CAFE</h1>
    <p>Est. 2020</p>
  </header>
  <main>
    <section>
      <h2>Coffee</h2>
    </section>
  </main>
</body>
</html>

Challenge: Learn Basic CSS by Building a Cafe Menu - Step 12

Link to the challenge:

You do not ‘put’ the h1 element anywhere. Your h1 element already exists. You need to add a CSS rule to change how it looks.

The CSS rule will have this format

But the hint says “You should have an h1selector in your style element.”

Right. You need a h1 selector. You are not sticking a new h1 element anywhere.

In this example, element is the selector for the element you want to style.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.