View Full Version : CSS: What is better? internal css in the <head> or external css?
Stick
04-19-2007, 10:45 PM
I've had better luck creating with css in the , I would rather have an external, and I don't understand why one works and the other doesn't(but I am a newbie at this. Still learning html and css). So which is better, external or internal css. What are the drawbacks of both?so i have a .html page with the css internally. I want to make it external, so I copy and paste to a new notepad file, save .css add the link in the html to the css, but yet its all messed up.What am I missing?
BountyJack
04-19-2007, 11:06 PM
External CSS is better because the file can be stored seperately and globally changed. You only need to add a line to reference the file to include the CSS in your Web pages.When using CSS it is preferable to keep the CSS separate from your HTML. Placing CSS in a separate file allows the web designer to completely differentiate between content(HTML) and design(CSS). External CSS is a file that contains only CSS code and is saved with a ".css" file extension. This CSS file is then referenced in your HTML using the instead of . See the link below for a tutorial.www.tizag.com/cssT/external.php
csanon
04-19-2007, 11:55 PM
Aside from separation of markup and style (keep CSS separate from (X)HTML markup), there is another benefit to keeping CSS files separate.Caching. Since different markup uses only one (or a few static) CSS file, browsers can cache the CSS file and that means less bandwidth used up. That reduces costs all around.
Joseph C
04-20-2007, 05:15 AM
I read that external css is safer and nobody can still steal it from you. Also you can change an external css file better than an internal one.
Samer Kamel
04-20-2007, 11:20 AM
in practice i always found external CSS much better .. simply coz u can use one CSS file across ur website .. and if u decide to change a formatting of headers for example .. u can edit one file and it will be reflected on all ur website .. which keeps ur website workin flawlessly and still all looking the same
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.