Skip to content Skip to sidebar Skip to footer

My Css Won't Link To My Html File

I am trying to build a simple website in Sublime Text Editor 2, however, my CSS file won't link to my HTML file and therefore printing plain text. My HTML code is:

Solution 1:

Your path your CSS file is probably wrong. If you're sane your CSS directory is in the webroot so your <link> should probably look like this:

<link rel="stylesheet" href="/css/style.css" />

Solution 2:

Definitely is your link's href incorrect.

Solution 3:

The link to your css files will be relative to the location of your html file. If both are int the same directory, then just include the name of the css file, if it is in a folder named "css" and that folder is in the same directory as your html file then you do "css/"

Solution 4:

I think your href is wrong

You can tried using a absolute url just like

<link rel="stylesheet" href="http://..../css/style.css" />

You can download a very nice plugin for firefox called "firebug" it show you when some resource can't be reach

Solution 5:

It will 100% work if your "call" link is placed within the html file. I'm having the same issue, my only work around is to include the call links in both the .html and .css ball ache, but it works

Post a Comment for "My Css Won't Link To My Html File"