Learn Basic CSS by Building a Cafe Menu - Step 11

Tell us what’s happening:
How to align text to center? Tried what i thoughgt but not relevant.

Your code so far

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <title>Cafe Menu</title>
    <style{ Text-align: center;<h1>CAMPER CAFE</h1> }>
    </style>
  </head>
  <body>
    <main>
      <h1>CAMPER CAFE</h1>
      <p>Est. 2020</p>
      <section>
        <h2>Coffee</h2>
      </section>
    </main>
  </body>
</html>

Your mobile information:

KYV43 - Android 7.1.2 - Android SDK 25

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

Link to the challenge:

Hi, @Sunpius. You almost got the syntax right.
This is how CSS selectors are strucured when selecting an element:

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

Hope that helps! :v:

1 Like