I am unable to link HTML file to CSS

I can’t seem to link the HTML file to CSS using a relative file path. As far as I know the code is correct, I’ve tried to solve it for a while and I can’t seem to link the file. I am using VS code.

Below is a screenshot of my code

Any assistance would be appreciated. i am out of ideas on how I could solve this.

1 Like

Hello @core2575980549, welcome to the forums! Try removing the ./ from the start of your file path, as your index.html file is in the same folder as your css folder. Alternatively, you could try an absolute file path (which is the entire “address” of the css file).


Thank you! I finally fixed the issue after stepping back for a minute and drinking a cup of coffee. It was an error in my CSS code. I was using a class selector when I should have been using an element selector which was why it seemed like the CSS file wasn’t linking.