27
Aug
08

How to attach a CSS Style Sheet to a Webpage

I find making separate CSS files is the best way to deal with styles (colours, fonts, sizes etc etc) across a website. The main benefit being, when you decide to make any changes you only have to change the CSS file.

First you need to make a style sheet. So either tap your own code in or put this for an example:

.style1 {
font-family: “Arial”, Helvetica, sans-serif;
font-size: 12px;
color: #FFFF00;
font-weight: regular;

Save the above code in a file called ’style1.css’

Now every page you make for the website can link to this file. Between the <head> and <head/> tags place this code:

<LINK rel=”stylesheet” type=”text/css” href=”styles1.css” mce_href=”styles1.css”>

There we go, job done. Just carry on using the styles as normal!


3 Responses to “How to attach a CSS Style Sheet to a Webpage”


  1. October 28, 2008 at 1:13 am

    THANX DAVEEEEEEEEEEEEEEEE

  2. December 17, 2008 at 9:37 pm

    That’s really useful. really simple and easy to follow, no waffle what so ever. I’ve looked all over and you summed it up in one!

  3. December 19, 2008 at 12:54 am

    Thanx for the simple and short easy to understand instructions, made my day.

    Mark


Leave a Reply