Learn Basic CSS by Building a Cafe Menu - Step 12

Tell us what’s happening:
I am not sure what I am doing wrong here.

The prompt was:
In the previous step, you used a type selector to style the h1 element. Center the h2 and p elements by adding a new type selector for each one to the existing style element.

I keep getting the error:
Sorry, your code does not pass. Don’t give up.

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

Your code so far

<!DOCTYPE html>
<html lang="en">
    <meta charset="utf-8" />
    <title>Cafe Menu</title>
      h1 {
        text-align: center;
      h2 {
        text-align: center;
      p {
        text-align: center;
      <h1>CAMPER CAFE</h1>
      <p>Est. 2020</p>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36 Edg/107.0.1418.42

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

Link to the challenge:

Welcome to our community!
The code is correct. Restart the step and do it again. If that doesn’t work, follow the instruction:
“Note: Some browser extensions, such as ad-blockers and dark mode extensions can interfere with the tests. If you face issues, we recommend disabling extensions that modify the content or layout of pages, while taking the course.”

1 Like

Thank you. Restarting it fixed the issue.

1 Like

You were writing the CSS code in the HTML file. That caused the issue.

Make sure that you don’t write CSS syntax on HTML files and vice versa.