View Full Version : Linking a CSS external sheet to a HTML pageI am trying to test my web design skills b

26 Dec 2010, 09:41 PM
Is there some sort of code to link the two?
Do I have to do something different in a text editor to make the pages link?
Do I have to position the CSS file somewhere different in the site folder?


26 Dec 2010, 10:54 PM
to link an external stylesheet you have to write the following in the head of the html page:
<link rel="stylesheet" type="text/css" href="style.css" />

the filename in href="" is the name of your css-file. when you have it in another folder than the html-file, then you have to give the relative path. for example href="css/style.css".

or when you have for example you html-file in a folder called "html" and you css-file in a folder called "css" then you must write href="../css/style.css".