Learn Basic CSS by Building a Cafe Menu - Step 14

Tell us what’s happening:
Please help me i dont know to do

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 */

<style>
 h1,h2,p styles.css {text align: center;}
</style>


/* User Editable Region */


Your browser information:

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

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

Link to the challenge:

Welcome to our community!

When you define css rules within a css file, you don’t need the html tags such as <style></style>. Delete them. The css rule should look like this:

element1, element2, element3 {
  property: value;
}

how to write styles.css?

Step 14

You have styled three elements by writing CSS inside the style tags. This works, but since there will be many more styles, it’s best to put all the styles in a separate file and link to it.

We have created a separate styles.css file for you and switched the editor view to that file. You can change between files with the tabs at the top of the editor.

Start by rewriting the styles you have created into the styles.css file. Make sure to exclude the opening and closing style tags.

Where i put styles.css here??

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

The styles.css has already been created by default:

The red circle shows the styles.css file is already chosen for you to input the CSS code into it. “HERE” is the place where you have to enter the correct CSS rule.

1 Like


What next? I dont know what to do. By the way thankyou

You have the answer in your question posted here. Don’t add the file name instead of “HERE!” than the css rule that has been previously written between ‘style’ tags in the html code. In other words, the code below your question is what you need here.

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