Index.css not being detected in Visual Studio 2022

Hello, this is Triston.

I am currently trying to link the a .css file to my index.html as part of the Hello World project described in Create Your First Local HTML/CSS Project.

When I right-click on “index.html” in the Solution Explorer window, the CSS is not applied.


However, when I place the index.css file at the root of the project and change the element accordingly, the CSS is applied.


This may be the consequence of using an alternative IDE, but I do not believe this is the case. If anyone could be so kind, can you inform me of anything I could be doing wrong? If you could, that would be excellent.


I noticed when you had the css file in the css folder you referenced it from the html with the path


If you look at the picture you provided, and it could just be the image, it looks like the html file is also in the resource folder. If it is then the path would be


I believe the path will be relative to the current directory of the existing file. Hopefully that is the issue :slight_smile: