Bug In Learn Basic css cafe menu

In Chapter 11 there is a small bug…

Even after writing the correct code it is still showing me that.

" You should have an h1 selector in your style element."

I tried so many times but still it is not going…

I wish they will solve this bug soon.

If you have a question about a specific challenge as it relates to your written code for that challenge and need some help, click the Ask for Help button located on the challenge (it looks like a question mark). This button only appears if you have tried to submit an answer at least three times.

The Ask for Help button will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.

There doesn’t seem to be a bug to me. If you paste your code in here to show us what you’ve done then we can help you find the issue.

To display your code in here you need to wrap it in triple back ticks. On a line by itself type three back ticks. Then on the first line below the three back ticks paste in your code. Then below your code on a new line type three more back ticks. The back tick on my keyboard is in the upper left just above the Tab key and below the Esc key. You may also be able to use Ctrl+e to automatically give you the triple back ticks while you are typing in the this editor and the cursor is on a line by itself. Alternatively, with the cursor on a line by itself, you can use the </> button above the editor to add the triple back ticks.

Below is my code.

    h1 {
     text-align: center;
}

the output is perfectly right but when I click on the check code it gives me this error I mentioned above

Please paste all of your HTML in here. The code you did paste does look correct, so I’m guessing you might have accidentally changed something else that is causing the tests to fail?

Another thing to do would be to restart the step to get the original HTML back and then try again, being very careful to only make the changes asked for by the instructions.

Or, there could possibly be a conflict with a browser extension you have installed that is causing the tests to fail?

It’s just really hard to help you figure out what is going on if we can’t see all of your HTML.

Yaa Sure, Below is the complete code.

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <title>Cafe Menu</title>
    <style>
     h1 {
     property: value;
}
    </style>
  </head>
  <body>
    <main>
      <h1>CAMPER CAFE</h1>
      <p>Est. 2020</p>
      <section>
        <h2>Coffee</h2>
      </section>
    </main>
  </body>
</html>

This is my complete code

Is this really what you are using?

noo noo
i have replaced it with text-align and centre

this is the correct code i have used.

<!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>

centre or center?

I’m a little confused. I asked you to paste in the the HTML you are using and you appear to have not done that. Please make sure you paste in the exact HTML you are using.

OK, I see that you have done that now.

this what i have exactly written in the code

Great! I agree, what you pasted in should pass. So I’m guessing you might have an extension installed that is adding extra style tags to the HTML behind the scenes and thus is throwing off the tests. Perhaps something like a dark mode extension. I would start disabling your extensions until you find the one that is causing the problem. Or switch to a different “clean” browser that doesn’t have any extensions installed.

yaa i have dark mode extension on

but it is already off

I would turn off every extension.

yaa thanks for your help the code work perfectly in ignito mode…

thank you everyone who helped me in this problem

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