Hi I am new to stack developer community.... I am not able to know which slash to use while saving a css file in css folder (/ or \) because I am currently learning web development and in that my professor when she creates a css file it something looks like ( css/style.css) and in mine it looks like (css\style.css) .
I am currently using mine, should I change it to my professor one ??????
this is the default css path that display in my pc
CodePudding user response:
Modern browsers will accept the /
as path separator on any popular platform. So there's no reason to use the backslash.
CodePudding user response:
You can use any slash. Either one will work fine.
All browsers (Google Chrome, Edge, Firefox, Brave, etc.) will support /
as well as \
, so there's no reason to be worried about which one to choose. Just choose whichever one which suits you.
If you want to know which slash to use when accessing a path locally, then read the below.
If you are using a Unix-based operating system (macOS, Linux), then both of those support forward-slashes in a path (/
).
However, if you are using Windows, then it supports backslashes (\
) in file paths.