Learn Basic CSS by Building a Cafe Menu - Step 11

Tell us what’s happening:
Describe your issue in detail here.

Your code so far

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

<!-- User Editable Region -->

    <style>
      element{property: value; center}
    </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/109.0.0.0 Safari/537.36

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

Link to the challenge:

Please Tell us what’s happening in your own words.

Learning to describe problems is hard, but it is an important part of learning how to code.

Also, the more you say, the more we can help!

am finding it hard to pass step 11

element {
 property: value;
}

Was an example of how your style should be structured. You should not actually use any of this in your code. Read the directions carefully, and match what they say with the example

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


sir what am i missing

Element and property should not be used. That text does not go in the style, and needs to be deleted. Lets looks at the directions again

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

You have figured out the h1 is the element which is good, but you do not use <> in css. If you want to give an element a style all you have to do is use the element without anything around it. So for example if I wanted to style a p element it would look like this

p {

}

See how I didnt include the <>?

The next step would be “setting its text-align property” Like I said you should not be using the word property anywhere in here. Given the example:

element {
 property: value;
}

Looking at that example, where do you think text-align goes? After you solve that, then there is only one place where center can go

thanks so much done :heart_eyes:

1 Like

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