Programming, website development forum Get latest updates by RSS Follow TechnicalTalk on Twitter Follow TechnicalTalk on Facebook 
HomeSearchRecent PostsLoginRegisterContact Us

Username  
Password    
  Forgot your password?  

Pages: [1]   Go Down
 
  Email this topic  |  Print
0 Members and 1 Guest are viewing this topic.

Embedded or Linked CSS?

 
webmaster forum
Computer Head in 'da House!
Activity
0%
 
Regular Coder
Posts: 85
Topics: 9
WWW
August 02, 2009, 05:49:58 PM

When I started using CSS, I had a choice of if I wanted to embed my CSS into every HTML file or if I wanted to link it and use a separate CSS file.  I decided to use linked CSS because I figured out if I ever wanted to make a change to the CSS, it would dynamically change every page linked to that certain CSS, instead of opening and editing every HTML file that needed the appearance change.  What do you all think?

Your PC Forums
 
webmaster forum
Activity
0%
 
Regular Coder
Posts: 53
Topics: 2
August 03, 2009, 08:25:41 PM

Linked is by far superior. It usually cuts down on page load times, because the CSS usually gets cached and then reused every time a subsequent page is loaded, instead of sending the CSS inside of your page over and over.
 
webmaster forum
polas  Offline
Activity
33.33%
 
Code Guru
Gender: Male
Posts: 1399
Topics: 85
WWW
August 04, 2009, 04:24:28 AM

Linked is by far superior. It usually cuts down on page load times, because the CSS usually gets cached and then reused every time a subsequent page is loaded, instead of sending the CSS inside of your page over and over.

Makes it easier to modify the CSS too Smiley

Mesham Type Oriented Parallel Programming Language, Free online technical support
 
webmaster forum
Activity
0%
 
New Coder
Gender: Male
Posts: 39
Topics: 0
WWW
August 15, 2009, 07:20:25 PM

You should definitely used linked CSS. The only time CSS should be embedded in any modern web page is when you're using dynamically generated CSS, like for instance a random background image in a page header.

Phantasy Star: Fringes of Algo | Castle Nintendo - Discussion Community
 
webmaster forum
hema1999  Offline
Activity
0%
 
New Poster
Posts: 5
Topics: 2
July 16, 2010, 02:14:25 AM

External style sheets are created with a similar syntax to document level (in the <head>) style sheets.  However, all you need to include are the selector and the declaration (see Using Style Sheets for more information).  Just like in a document level style sheet, the syntax for a rule is:

selector {property : value;}Save these rules into a text file with the extension . css.  This isn't required, but it is a good habit to get into, so you can immediately recognize your style sheets in a directory listing.

Once you have a style sheet document, you need to link it to your Web pages. 
===============
 Organic SEO| UK SEO
 
  Email this topic  |  Print
Pages: [1]   Go Up
 
Jump to:  



Powered by SMF 1.1.15 | SMF © 2011, Simple Machines


Google visited last this page February 06, 2012, 05:52:50 AM