Ad

Why Is My CSS File Not Linking To My HTML File On VS Code?

I'm working on VS code, and I'm having difficulty linking my style sheet to my index.html file. When I look at the folder that my files are in, my css file saves as a web page-- is that typical? I'm wondering if that is my problem...

The code that I am using to link my css file to my html file is:

link rel="stylesheets" type="text/css" href="stylesheets.css"

The above code is wrapped in <>...but when I put it into the question, the code ends up not showing up, so that's why does are missing.

Thank you in advance!

Ad

Answer

I think the problem is in the rel you should use stylesheet instead of stylesheets

<link rel="stylesheet" href="stylesheets.css">

and make sure stylesheets file and HTML file in the folder

Ad
source: stackoverflow.com
Ad