Learn Basic CSS by Building a Cafe Menu - Step 12

Tell us what’s happening:
I don’t understand what I’m told to do. they keep saying; You should have an h1 selector in your style element.

  **Your code so far**
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8" />
  <title>Cafe Menu</title>
  <style element {property: value;}>
  </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/105.0.0.0 Safari/537.36

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

Link to the challenge:

You don’t want to actually use these values in your CSS. This is just an example showing you how to format CSS. You would replace element with the element you want to target. You would replace property with the CSS property you want to set. You would replace value with the value you want to give the CSS property.

Also, this goes in between the opening and closing style tags, not inside the opening tag.

Tell us what’s happening:
I don’t know what I’m doing wrong. They keep saying; Your text-align property should have a value of center .

  **Your code so far**
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8" />
  <title>Cafe Menu</title>
  <style>h1{CAMPER CAFE: center;}
  </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/105.0.0.0 Safari/537.36

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

Link to the challenge:

Hi!! Try checking your statements on “style”. You want to give a certain property to all your “h1” elements, no matter what text they may have (like “CAMPER CAFE” in this case).
So, the property that you need now is the “text-align”, that aligns your text as the name suggests and this is what should take the value “center”.
Hope this helps!

please can explain more, I don’t understand

you are given this syntax block for reference:

element {
 property: value;
}

This syntax block tells you something about CSS code now.

CSS (cascading styling language) is used to style the webpage to make it look nicer (and ultimately do fancy things like animation and reacting to your mouse movements for eg)

So start by copying and pasting the syntax block between the <style></style> tags.

Then, you need to do some substitution.
Which “element” are we trying to style?
Which style “property” am I attempting to modify.
What is the new “value”?

Try to parse the exercise text again to see what it gives you for these 3 things that need to be replaced in the code.

1 Like

I don’t why I am still not getting it since yesterday

try to identify one sentence in my last post that you understand first. Then ask me about the next one that you don’t understand so I can rephrase.

Tell us what’s happening:
I am on still on this challenge for days now, I have to keep restarting and refreshing the step but its not working. They keep saying;
Your text-align property should have a value of center .
Your code so far

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8" />
  <title>Cafe Menu</title>
  <style>h1 {text-align=CAMPER CAFE:center;}
  </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/105.0.0.0 Safari/537.36

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

Link to the challenge:

What is ‘CAMPER CAFE’ doing in there?

Thank you very much, I just passed the challenge

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