Learn Basic CSS by Building a Cafe Menu - Step 16

Tell us what’s happening:
I’m pretty sure I have it correct, sometimes I have to press “check code” a few times before it accepts my answers but for some reason it won’t go. What am I doing wrong here?

Your code so far

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

Your browser information:

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

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

Link to the challenge:

Welcome! Restart the step and do it again. I hope that asterisks are there just to emphasize your problem.

yah its not actually on the code. I’ve restarted and retyped it a hundred times cuz im pretty sure its right.

yah bro this crap aint working i think its busted or sumn. plus when i check youtube, the other people on this step say “step 17” or sumn

it keeps saying “you should have one self closing link element” even though there’s clearly a forward slash after “styles.css”

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. Your code works fine on Chrome.

Hello, i know why it doesn’t work… Because it’s a self-closing tag there’s no “/>” the end but only a " > "

1 Like

If you have a question about a specific challenge as it relates to your written code for that challenge, just click the Ask for Help button located on the challenge. It 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.

the href portion has to come first like this:

Cafe Menu

I spent way too long on this… it specifies in the directions that it matters where they go ig

*

Cafe Menu

Cafe Menu

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

SWe are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

You don’t need the “>” at the end of the line at all, link is self-closing

Here ;

Mod edit: removed solution

You’re welcome.

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

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