Learn Basic CSS by Building a Cafe Menu - Step 12

It says I need to add a new h2 and p selector but, I’m not sure what I did wrong, I believe it means selecting the h2 and p element below in order to style it. But I am not sure how I selected it wrong

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

<!-- User Editable Region -->

    <style>
      h1 {
        text-align: center;
          h2 {
          text-align: center;
          p {
            text-align: center;
          }
        }
      }
    </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/114.0.0.0 Mobile Safari/537.36

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

Link to the challenge:

You have to select the h2 and p element outside the selected h1.

    <style>
      h1 {
        text-align: center;
      }
    </style>

Thats the code from the previous task. Just continue after the closing bracket “}” with your h2 selector. Do not nest them.

1 Like

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