Learn Basic CSS by Building a Cafe Menu - Step 12

Tell us what’s happening:

I reset many times, rewrite code too but still Step: 12 can’t pass, what I should do?

Your code so far

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

<!-- User Editable Region -->

    <style>
      h1,h2,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/131.0.0.0 Safari/537.36 Edg/131.0.0.0

Challenge Information:

Learn Basic CSS by Building a Cafe Menu - Step 12

Hi there and welcome to the forum!
In this step you don’t need to group selectors, you need to add

a new type selector for each one

h1 {
text-align: center;
}
h2 {
text-align: center;
}
p {
text-align: center;
}
I have tried these too, but same.

The code you have shared works on my end.
Please ensure that you have disabled any extensions that interface with the freeCodeCamp website (such as Dark Mode and Ad Blocker), and set your browser zoom level to 100%. Both of these factors can cause tests to fail erroneously.

h1 { text-align: center; } h2{ text-align:center; } p{ text-align:center; }

error:You should not add a new style tag. Add the new CSS rules to the existing style tag.

I cleared browser catche but still showing this.

Do you still have the style tags?

h1 { text-align: center; } h2{ text-align:center; } p{ text-align:center; }

yes I have.

I mean, these tags:

<style>

</style>

Please don’t share screenshots of your code.

When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

Thanks, but I dont know how to solve the problem.

Then please try one of the following steps to move forward.

Click on the “Reset” step button and force a refresh of your page with CTRL + F5 if you’re on Windows then try to paste the code in again. On other systems, please follow the instructions here.

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.

or - Turn off high contrast themes on Windows (from accessibility settings menu)

I hope one of these will work for you.

Hello, huge thanks to you; I tried it in a private tab, and it works!

1 Like

Nice to hear, happy coding!

1 Like