Subha Maharjan
Subha Maharjan

Reputation: 93

External Css stylesheet not linked to my HTML

My External css file is not linked to my html page. I had with inside a folder with path

->app-->css-->layout.css
->index.html

In my index.html file I linked it like <link rel="stylesheet" type="type/css" href="app/css/layout.css"> it won't link it. i searched for the file in the chrome (inspect-->sources) and the css file wasn't listed there

I then put the layout.css and index.html in the same path. <link rel="stylesheet" type="type/css" href="layout.css">

it still didn't work. I checked in multiple browser like chrome and firefox as well but it didn't work.

Upvotes: -1

Views: 102

Answers (3)

Om_16
Om_16

Reputation: 686

You can directly use the command below to get the desired result

<link rel="stylesheet" type="text/css" href="layout.css">

Its a very common mistake that everyone do... Please notice that here type="text/css" not type/css...

Regards,
Om Chaudhary

Upvotes: 0

Darshan Unadkat
Darshan Unadkat

Reputation: 151

Just replace the type/css to text/css and there is no need to write full path name in href.

Upvotes: 1

lanxion
lanxion

Reputation: 1430

Not sure if it is causing the error(most probably is), but type should be text/css instead of type/css.

Upvotes: 2

Related Questions