WebRef.eu  - Internet Marketing and Online Business Resources  

Home / Site Map | Contact

 

How to Reference an External CSS Stylesheet from an HTML File

To reference an external CSS stylesheet from an HTML page, you need to add the HTML code into the <head> section of your web page, referencing the location of the .css stylesheet file.

For example, if you had a stylesheet file called styles.css at root directory level, you would use:

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

Note, the rel attribute describes the type of relationship the linked file has to the html page.

For ease of maintenance, web developers will often create a css folder to hold all the stylesheets the website uses. For example, if the css folder contained a style sheet called custom.css, you would use:

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



Visit LowPrices.co.uk for Your UK Shopping



 




Low Prices UK Shopping

Compare Prices
at LowPrices.co.uk


Home / Site Map | Contact

All Content ©2020 WebRef.eu