Learn Basic CSS by Building a Cafe Menu - Step 11

Tell us what’s happening:

Hi I am not quite sure what I am being asked to do and how to do it, please explain ### 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;
      }
    </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 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Safari/605.1.15

Challenge Information:

Learn Basic CSS by Building a Cafe Menu - Step 11

Hello:)
Your code has two main blocks :
HTML( HTML Tutorial (w3schools.com))
and
CSS:( HTML Styles CSS (w3schools.com))

You write CSS code within “style” element.
You write your HTML code in the “body”.

HTML in this case:

<body>
    <main>
      <h1>CAMPER CAFE</h1>
      <p>Est. 2020</p>
      <section>
        <h2>Coffee</h2>
      </section>
    </main>
  </body>

Your CSS code should be here:

 <style>
    </style>

and this is your task:
Center your h1 element by setting its text-align property to the value center . Do not just copy the example.

(element) h1 {(property) text-align: (value) centre; }

propety and value in css: CSS Syntax (w3schools.com)

CSS selector

3 Likes

Hello @kabelotoo !

As stated by @llencses78, the step is asking us to replace the element with the h1 element, the property with the text-align property and the value with the center value.

Following the guidance provided in the previous post by llencses78 you will be able to pass the step, and move on.

May your coding path be smooth.

1 Like

Got it guys thank you.

Is this ;
element {
property: value;
}
a syntax for style or what exactly is the syntax for? need to know how and when to use it in future

1 Like

If you still need the answer, this is the syntax you will always follow when you enter styles in your css

2 Likes

thank you, I understand now

1 Like

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