Answer the question
In order to leave comments, you need to log in
How should the path to css, js look like?
Hello. Such a question, does it matter what the link to the css file looks like?
<link href="http://site/styles/styles.css" rel="stylesheet">
<link href="styles/styles.css" rel="stylesheet">
Answer the question
In order to leave comments, you need to log in
[IMHO mode on]
As for me, you do not need to specify the site address, but put / before the paths - yes. And yet - it seems to me that it would be more reasonable to name the folder with styles css, and with scripts - js.
[IMHO mode off]
There is absolutely no difference. But when you develop a site on your local, you probably use a relative address (without a URL), so, for me, using a relative address looks more logical
It's most likely a matter of habit. I write with url, I like it more from an aesthetic point of view. Changing such a url when transferring to a new domain is as easy as shelling pears. Most CMS have the ability to add the url automatically.
I also add a URL to all pictures and scripts on the site
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question