...

View Full Version : CSS contained within the XHTML file?



neonflorida
11-24-2008, 10:39 PM
Hi.

I was wondering if it is better practice to have your CSS as a seperate stylesheet or is it ok to have it included with the Head tags on the HTML page?.
Does this come down to personal preference or just better coding practices?.

oesxyl
11-24-2008, 10:50 PM
Hi.

I was wondering if it is better practice to have your CSS as a seperate stylesheet or is it ok to have it included with the Head tags on the HTML page?.
Does this come down to personal preference or just better coding practices?.
my opinion:
- external stylesheet, it's more easy to deal with it and html page is shorter
- personal preference, I thing 'better coding practices' is a buzz word, :)

best regards

Avril
11-25-2008, 08:32 AM
It really depends on whether your pages are styled differently each time or not. If you use one or two basic designs for several pages, it would make more sense to use external stylesheets. If each of your pages is different, it wouldn't, as then you would have to make an external stylesheet for each page. It is not a question of better or worse coding practices. However, if you use an external stylesheet to code a basic page, I suggest you first code it in the page itself. Once you have got it right and know it is what you want for the other pages, you can move the .css to an external stylesheet, if not it is quite annoying to have to open the external stylesheet each time you want to make a tiny change in the page.

Cheers!

Apostropartheid
11-25-2008, 04:18 PM
As Avril said, if your design is consistant, external stylesheets are the way to go, as it reduces download times. More often than not, this will be the case.

harbingerOTV
11-25-2008, 05:36 PM
my opinion:
- personal preference, I thing 'better coding practices' is a buzz word, :)


I have so many not so funny to anyone else replies to that one. kudos.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum