Learn Basic CSS by Building a Cafe Menu - Step 17

** What’s happening:**
While linking styles.css to html with link element inside head element, the test does not pass because the link element is not read by the tester which i have in my code. The error says:

Test: Sorry, your code does not pass. You’re getting there.

Hint: You should have one self-closing link element.

Is the code incorrect? If it is correct then Why did this happen? Will this happen again?

Code so far

/* file: index.html */
<!DOCTYPE html>
<html lang="en">
<head>
  <link href="styles.css" rel="stylesheet" />
  <meta charset="utf-8" />
  <title>Cafe Menu</title>
</head>
<body>
  <header>
    <h1>CAMPER CAFE</h1>
    <p>Est. 2020</p>
  </header>
  <main>
    <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 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36

Challenge: Learn Basic CSS by Building a Cafe Menu - Step 17
Link to the challenge:

Your code is passing for me. Maybe try restarting or trying it in a different browser?

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