Skip to main content
1 of 2

Why does CSS want me to use a back-slash in URLs but the filepath will only copy using forward-slash?

I'm learning webdesign, HTML, and CSS all for the first time to build my own site from the ground up, so this may be a very amateur question, but I am genuinely curious. I'm using notepad++ to write everything and currently have all of my files saved locally to work on before uploading them to Neocities.

When I want to link to a file as a source, I simply copy+paste the file-path. When I do this, the file-path on Windows uses forward-slashes "/". The CSS file seems to only accept URLs with a back-slash "\". Why is this?

Its gotten pretty annoying to paste the file-path and then manually change every / into a \. Is there any way to either automate the process of changing each /, or is there a setting I can change to make the file-path copy using \? Is this a weird notepad++ quirk?

Any advice is appreciated. I'm learning how to do all of this myself, and its been quite a journey.