I would like to ask a little help to link my stylesheet file to my html pages...
public
index.html
>assets
>css
file.css
>js
>img
>pages
page1.html
page2.html
I tried to link my stylesheet like this:
<link rel="stylesheet" type="text/css" href="/assets/css/basic.css">
but it doesn't work.
Moreover, i can't link also the index.html in page1.html. I put this tag in page1.html and it doesn't work:
<a class="nav-link" href="index.html">Home</a>
Ok I've done. My problem was that file.css is located in the folder one level up from the current folder so that I have to describe the path starting with ../
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.