How to Reference an External CSS Stylesheet from an HTML FileTo 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
|
|
All Content ©2020 WebRef.eu |