Learn Basic CSS by Building a Cafe Menu - Step 12

Tell us what’s happening:

Describe your issue in detail here.
I’m not sure what to do at step 12, within the style elements. It says to center the h2 and p element but for some reason my code is wrong, I’m not sure what part of it is incorrect because I checked with chat-GPT and it also gives me the same answer that I originally came up with.

Your code so far

<!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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0

Challenge Information:

Learn Basic CSS by Building a Cafe Menu - Step 12

When I run your code, it passes. Try resetting the challenge and inputting your solution again.

1 Like

I tried that many times but it still says that my code does not pass the test.
it says: " You should not add a new style tag. Add the new CSS rules to the existing style tag."

1 Like

Welcome to the community @rakib.mrhihi7174 !

If you have any extensions, or are working in dark mode, sometimes these cause issues with the code not being recognized. It is best to disable them when submitting the code.
As well, some browsers have extensions included so, though we have disabled the ones we see, it still may not work.

Sometimes, submitting the code from a different browser works.

If any of these suggestions work for you, please be sure to check Solution by @ArielLeslie as her guidance was first offered to you.

Keep up the good progress! :sun_with_face:

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