Learn Basic CSS by Building a Cafe Menu - Step 11

Tell us what’s happening:

I need help in step 11 of CSS building a cafe. It is telling me h1 selector and I don’t understand what and to do the selector

Your code so far

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

<!-- User Editable Region -->

    <style>
      element{text-align: centre;}
    </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 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Mobile Safari/537.36

Challenge Information:

Learn Basic CSS by Building a Cafe Menu - Step 11

Please I need help and solutions to my post

Center the content of the h1 element

h1 is the name of the element. Replace the word “element” in your code from the example with h1

1 Like

Be patient, “If you wait by the river long enough, the bodies of your enemies will float by.”

please look at the example code:

element {
 property: value;
}

The code template shown in the step is meant to show you what you should write and where it should go.

Start by clicking reset so you are starting from a clean setup.
Then copy this code template in between the two style tags in the editor.
After that, replace the word element with the name of the element you want to select. (in this case we want to select h1)
Then replace the word property with the name of the css styling property that we want to modify or specify. In this case it is the text-align property.
After that, replace value with the style property value that we need text-align to be. In this case we need the text to be aligned in the center. So type center where value is currently.

Hope this helps.

I have done same thing but it’s not working

Tell us what’s happening:

Please help me out in code step 11 of CSS building cafe

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:centre ;
       }
    </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 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Mobile Safari/537.36

Challenge Information:

Learn Basic CSS by Building a Cafe Menu - Step 11

center not centre
also pls leave a space to the right of the colon

1 Like

I merged the duplicate topic you created back into the original one.
Please don’t create a duplicate topic next time. Just add your code and comments to the first topic you made to continue getting help.

1 Like