Design a Cafe Menu - Step 7

I am getting the message that “You should have an h1 selector in your style element.” I have the h1 in the element and the h1 is centered in the Preview. This prevents me from moving forward. Any thoughts on what the issue might be?

<!DOCTYPE html>

<html lang="en">

  <head>

    <meta charset="utf-8" />

    <title>Cafe Menu</title>

    <style>

      h1 {

        text-align: center;

      }

    </style>

  </head>

  <body>

    <main>

      <h1>CAMPER CAFE</h1>

      <p>Est. 2020</p>

      <section>

        <h2>Coffee</h2>

      </section>

    </main>

  </body>

</html>

Design a Cafe Menu: Step 7 | freeCodeCamp.org

Welcome to the forum @Grestalf,

I’ve formatted your code for readability and testability and added a link to the challenge.

In the future, please use the “Help” button to create a help request.

For this step, take another look at the instruction:

Delete the three existing type selectors and replace them with one selector list that centers the text for the h1, h2, and p elements.

You have a selector only for the h1 element, but this step is teaching you how to create a selector with the same property/value for more than one element.

Happy coding

Thanks, but I am on Step 7, not 9, and even though I have the h1 element in the tag, it is giving me, "You should have an h1 selector in your style element.”

My mistake. I’ve edited the link to go to Step 7 instead of Step 9.

Your solution works from my end. Please try one of the following steps to move forward.

Click on the “Restart Step” button and force a refresh of your page with CTRL + F5 then try to paste the code in again.

or - Try the step in incognito or private mode.

or - Disable any/all extensions that interface with the freeCodeCamp website (such as Dark Mode, Ad Blockers, or Spellcheckers), and set your browser zoom level to 100%. Both of these factors can cause tests to fail erroneously.

or - Ensure your browser is up-to-date or try a different browser.

I hope one of these will work for you.

Filed in Duck\Cuck and Edge, passed in Brave.