16
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 10 Oct 2026
16 points (94.4% liked)
Programming
28795 readers
145 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities !webdev@programming.dev
founded 3 years ago
MODERATORS
I'm no webdev, but I think neither / nor ../ should be there. The paths are relative to where you are currently.
Confusing... If neither
/or nor.../should be there then how to define the path. Or I just didn't get what you mean?Paths don't have to start with either of those. Just "styles/mystuff.css" is perfectly valid.
If you start with / the server looks at whatever IT thinks the root folder is, which may not even be visible to your app or site. That's not what you want most of the time.
Even at the command prompt you can do "cd styles" without any / or .. at all. Try it. If you really want you can probably use "./styles", where the single dot means the current directory. But you really shouldn't need it.
When debian.html is loaded, href in it looks at current path, so . would be something like http://website.com/linux-guides/debian There is no styles.css in that path, but we can request href to point to http://website.com/styles.css with a few ../../
I think its not a good practice these days, but on pure html site and for learning, definitely valid.