Learn Basic CSS by Building a Cafe Menu - Step 11

I don’t even know what to do could someone send an example of what i should do. Please!!!

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

<!-- User Editable Region -->

    <style>
    </style>

<!-- User Editable Region -->

  </head>
  <body>
    <main>
      <h1>CAMPER CAFE</h1> { property:text-align value;center}

      <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/112.0.0.0 Safari/537.36

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

Link to the challenge:

1 Like

Just as in the challenge, it says that you need a selector, a pair of curly braces, and then the property you want to set and the value you want to set that property to.

When you’re just targeting an element, it’s set up like this:

element {
 property: value;
}

All you need to do is to replace element with h1, the property with text-align and set the value to be center.

What you’re doing is aligning any text within that h1 element to be centered.

4 Likes

could you please give an example cause i dont even know where to put it

In this challenge, you put the CSS rules inside of the style tag like so:

<style>
  element {
    property: value;
  }
</style>
1 Like

hey I found that I had to remove the “<” from “<h1”. I assumed because its an element that they all need an “<” however I believe when you are adding a style to an element you remove the “<” that’s what I had going wrong and my code cleared. Also I had no close tag h1.

2 Likes

I was trying to put an h1 element in (with open and close) instead of having h1 as element. TY for the help.

2 Likes

Thank you so much for the help.

2 Likes

jeez thank you so much