Learn Basic CSS by Building a Cafe Menu - Step 14

Tell us what’s happening:
Describe your issue in detail here.

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <title>Cafe Menu</title>
    <style>
      h1, h2, p {
        text-align: center;
      }
    </style>
  </head>
  <body>
    <main>
      <h1>CAMPER CAFE</h1>
      <p>Est. 2020</p>
      <section>
        <h2>Coffee</h2>
      </section>
    </main>
  </body>
</html>
/* file: styles.css */

/* User Editable Region */

<!DOCTYPE html>
<html lang="en">
<head>

/* User Editable Region */

<meta charset="utf-8">
<title>Cafe Menu</title>
h1
{
  text-align: center;}
  h2 {
    text-align: center;
  }
  p {
    text-align:
  }
 </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/115.0.0.0 Safari/537.36

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

Link to the challenge:

what is the problem here?

Welcome to the community.

Please kindly describe the challenge you are facing.
I understand that describing programming issue is quite difficult, but gaining this skill is also an important aspect of software engineering.
So, the more you tell us, the better we can help you.

Happy coding…

1 Like

You don’t want to put HTML in the styles.css file, just CSS.

You just need to copy the current CSS you have inside the style element in your HTML into the styles.css file.

1 Like

i have copied the current CSS bt i keep getting …Your styles.css file should have the h1, h2, p type selector.
heres my code

Cafe Menu
  h1, h2, p {
    text-align: center;
  }

CAMPER CAFE

Est. 2020

Coffee

You only want the CSS in the styles.css file. Do not put any HTML tags or other text in there. The CSS is the stuff between the opening and closing style tags in your HTML. Do not include the style tags in styles.css. Just the CSS between them.

i have and this is the response i get
Your styles.css file should have the h1, h2, p type selector.

You’ll need to show us your updated CSS in the styles.css file so we can see for ourselves.

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.

///

Cafe Menu h1, h2, p { text-align: center; }

CAMPER CAFE

Est. 2020

Coffee

///

You need to use back ticks, not forward slashes. If you can’t find them on your keyboard then you can use the </> button on the editor nav menu. Just remember to have the cursor on a line all by itself before you click the button.

Also, I can tell that you still are including HTML in the styles.css file. I would restart the step to get a blank styles.css file. Then be sure to only put the CSS in that file.

let me give it another try

thank you guys it worked!!!

1 Like

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