Programming and Webmasters forum
HomeSearchRecent PostsLoginRegister Contact Us

Username  
Password
Announcing 14th Weekly Contest - From 25 July To 01 August.

Win every week on this forum.

Chek out How To Win?
 

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

Embedded or Linked CSS?

 
webmaster forum
Contest Points: 100
 
Regular Coder
Posts: 85
Topics: 9
Computer Head in 'da House!
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
Contest Points: 100
 
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
*
 
Hacker
Gender: Male
Posts: 1224
Topics: 78
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
Skydive in North East England
 
webmaster forum
Contest Points: 100
 
New Coder
Gender: Male
Posts: 36
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
 
webmaster forum
hema1999  Offline
Contest Points: 100
 
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.11 | SMF © 2006-2009, Simple Machines LLC


Google visited last this page July 29, 2010, 12:00:04 PM

Valid XHTML 1.0 Transitional     Valid XHTML 1.0 Transitional