Learn Basic CSS by Building a Cafe Menu - Step 17

Hey, I have written the correct syntax to link stylesheet to HTML page but still, it doesn’t pass the case

  **Your code so far**
/* file: index.html */
<!DOCTYPE html>
<html lang="en">
  <meta charset="utf-8" />
  <title>Cafe Menu</title>
  <link rel="stylesheet" href="styles.css">
    <h1>CAMPER CAFE</h1>
    <p>Est. 2020</p>
/* 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/ Safari/537.36

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

Link to the challenge:

Hi @Aman-Singh-Kushwaha

Welcome to FCC.

Your solution works on my end on Chrome. Perhaps try using Chrome if you are using a different browser.

Hey @nibble , I am too using chrome on my 14’’ display laptop, but the is still occurring

What about switching to light mode/theme?

Really, does theme matters ?

Well, in this case I am not sure but in some cases theme does matter. Perhaps try something like:

<link rel="stylesheet" href="styles.css"/>

Yes it worked @nibble , Can you explain me please why do you add / at end in link tag, as that was the only difference

<link rel="stylesheet" href="styles.css"/> and <link rel="stylesheet" href="styles.css"> are both valid according to the HTML spec .

On my end both of them pass the tests. I am not sure why yours isn’t.

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