Learn Basic CSS by Building a Cafe Menu - Step 11

Tell us what’s happening:
please I don’t understand what they want to do. I tried to follow the example but still don’t it

Your code so far

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <title>Cafe Menu</title>

<!-- User Editable Region -->

    <style> <h1>{text-align:value;center} </h1>
    </style>

<!-- User Editable Region -->

  </head>
  <body>
    <main>
      <h1>CAMPER CAFE</h1>
      <p>Est. 2020</p>
      <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/114.0.0.0 Safari/537.36 OPR/100.0.0.0

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

Link to the challenge:

This is not the correct syntax for CSS.
The style element in HTML is a means of inserting CSS into an HTML document directly, but CSS syntax is different from HTML syntax.
Inside your style element you can create selectors and apply properties to elements, using the syntax which is illustrated in the challenge description:

element {
 property: value;
}

In this step you should apply a property of text-align with the value center to the h1 element. So, copy the syntax above and replace the words element, property and value with their corresponding values.

okay i dont still understand you

{ text-align: center; }

This is how you could add a CSS style to all p elements in your HTML document, which will turn the text colour red. You have a p selector, a color property and a value of red.

<style>
  p {
    color: red;
  }
</style>

You should do something similar, except you should have an h1 selector, a text-align property and a value of center.

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