Reputation: 21
I am trying to make a website, and my css seems not to exist, no error, no style, nothing. This is what I have got:
<link rel="stylesheet" type="type/css" href="/css/style.css"/>
This is the path:
index.html /css --> style.css
I went to the console to search after any error, there is no error, none. In fact, I went to the sources, and it is not even there.
Please, I would like to get feedback, thank you.
Upvotes: 2
Views: 557
Reputation: 531
Set the type to "text/css"
. Also, try not to use a /
at the beginning of your file paths if you can.
You can use this line instead.
<link rel="stylesheet" type="text/css" href="css/style.css"/>
Upvotes: 0
Reputation: 104
<link rel="stylesheet" href="./css/style.css"/>
This should do it, or you can also replace your type="type/css" to type="text/css"
type="type/css" is not the correct link type.
Upvotes: 2
Reputation: 9118
You should be careful of using /
prefix in the paths.
Also, there's no link type called type/css
. It's text/css
.
Both of these will work:
<link rel="stylesheet" type="text/css" href="css/style.css"/>
<link rel="stylesheet" type="text/css" href="./css/style.css"/>
Upvotes: 2