How do I link my HTML file to my CSS file?

My HTML file just refuses to link to my CSS file
Here’s my project: click here

Learning html

I’ve been reading on this, but I still can’t figure it out. I’m still learning.

Hi, because you’re serving your app with express, you’ve got to imagine that the public and views folders actually don’t exist - you’ve hot to imagine that views/index.html is index.html,and public/style.css is style.css - because that how express routes them, as in server.js. Therefore,in views/index.html, you need to replace the current href for the link tag to ./style.css.
I hope this helps, and happy Glitching!

Clicking it gives me this:

Maybe it’s a private project?

After some time of researching I found that ../style.css works, but thanks, it helped me understand how it works!

1 Like