Learn Basic CSS by Building a Cafe Menu - Step 12

Tell us what’s happening:
this style element

{text-align: center;
}


the code doesn’t work and appear this massage
You should have an h1 selector in your style element.
could you help me ?

  **Your code so far**
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8" />
  <title>Cafe Menu</title>
  <style> <h1>{text-align: center;
  }</h1>
  </style>
</head>
<body>
  <header>
    <h1>CAMPER CAFE</h1>
    <p>Est. 2020</p>
  </header>
  <main>
    <section>
      <h2>Coffee</h2>
    </section>
  </main>
</body>
</html>
  **Your browser information:**

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

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

Link to the challenge:

Hello,

you are are trying to put an HTML element into the CSS part.
Even if it takes HTML names as selectors, CSS is its
own thing with its own syntax.

Format CSS like this:

element {
property: value;
}
h1 (just “h1”) is the element, text-align the property and center the value
in the exercise. Just put them in their right spot and you will past the test!

1 Like