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">
<head>
<meta charset="utf-8" />
<title>Cafe Menu</title>
<link rel="stylesheet" href="styles.css">
</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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36
Challenge: Learn Basic CSS by Building a Cafe Menu - Step 17
Link to the challenge:
nibble
2
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
nibble
4
What about switching to light mode/theme?
Really, does theme matters ?
nibble
6
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
nibble
8
<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.
system
Closed
9
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.