Reputation: 45
I have recently started to get back into website development and I know for external style sheets you do
<link rel="stylesheet" type="text/css" href="main.css">
for when the website is local to your computer but how would someone use external stylesheet if the website were to be made public and put on a hosting site such as godaddy.com? One example I found was from google docs:
<link href="//docs.google.com/static/document/client/css/1823751902-KixCss_ltr.css" type="text/css" rel="stylesheet">
Upvotes: 0
Views: 182
Reputation: 65
if you are hosting your stylesheets on the server where you website is, generally you put your stylesheets in the same folder(or subfolder) where your index.html page is and provide a relative links on the pages you want your stylesheet to work on. for e.g
href="style.css" (if in the same folder as index.html) or
href="subfolder/style.css" ( if in a subfolder)
if you are hosting your stylesheet or using a third party stylesheet then put a complete link as it would appear on the address bar of the browser.
Upvotes: 0
Reputation: 85575
There are two types of path you can use.
One is relative and another is absolute. Relative path is located in your server and absolute path can be anywhere in the internet.
look here for more information
Upvotes: 1