Webmaster Forum


Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
LinkBack Thread Tools Display Modes
Share |
  #1 (permalink)  
Old 02-22-2010, 05:30 PM
Cricket's Avatar
V7N Administrator
 
Join Date: 10-13-03
Location: Texas
Posts: 40,366
iTrader: 0 / 0%
Thumbs down Benefits of Using External Style Sheets vs. Inline CSS

I would like to hear from our experienced members about the benefits of using an external style sheet vs. inline CSS and if you feel it is worth the time to convert a site from inline CSS to an external style sheet.

Why do you feel that way?
__________________
GNC Web Creations - Free Search Engine Optimization (SEO) Training Class
Website Development Training - Website Development Training Blog

Join V7N on Facebook today! facebook.com/V7Network
 
Reply With Quote
  #2 (permalink)  
Old 02-23-2010, 12:32 AM
HTMLBasicTutor's Avatar
Super Moderator
 
Join Date: 10-29-07
Location: British Columbia, Canada
Posts: 18,048
iTrader: 5 / 100%
Quote:
Originally Posted by Cricket View Post
the benefits of using an external style sheet vs. inline CSS
Benefits of Using an External Stylesheet (External CSS)
  1. All your styles are in one spot.
  2. Reduces web page coding.
  3. Easier to maintain the website.
Problems with Inline Styling
  1. Adds coding to the web page.
  2. Difficult to maintain. You have to look for every instance when making a change.

Your goal should be to create the least amount of coding required and create a situation where the site is easily maintained.

Quote:
Originally Posted by Cricket View Post
and if you feel it is worth the time to convert a site from inline CSS to an external style sheet.

Why do you feel that way?
As noted above, using an external stylesheet saves on coding. There is one line added to the head section of your web page coding. An external stylesheet also makes it so much easier to make sitewide changes like font colour for example.

With inline styles, if you wanted to apply the font colour example, you would have to find every instance where you have set the font colour and fix it. This can take a very long time if you have lots of pages. With an external stylesheet it just takes a sec to update all the pages.

I have an article that explains all this further for those still wondering about this: Which Stylesheet Type to Use and When?
__________________

HTML Basic Tutor - Learn how to code for better SEO
Basic Computer Information - Computer & internet basics for website owners

SEO troubleshooting and review services available. - Pm me.
 
Reply With Quote
  #3 (permalink)  
Old 02-23-2010, 12:35 AM
Cricket's Avatar
V7N Administrator
 
Join Date: 10-13-03
Location: Texas
Posts: 40,366
iTrader: 0 / 0%
Thank you for providing such a detailed response!

For me personally it comes down to an external style sheet making it sooooo much easier to make sure that the styles on my pages are consistent throughout the site, otherwise I end up varying things without realizing it.
__________________
GNC Web Creations - Free Search Engine Optimization (SEO) Training Class
Website Development Training - Website Development Training Blog

Join V7N on Facebook today! facebook.com/V7Network
 
Reply With Quote
  #4 (permalink)  
Old 02-23-2010, 02:35 AM
abajan's Avatar
v7n Mentor
Latest Blog:
None

 
Join Date: 08-08-09
Location: Barbados
Posts: 270
iTrader: 0 / 0%
Well, I’m hardly an experienced user but as a rule of thumb, inline styles should only be used for rapid prototyping. Hopefully, you’re not asking this question because you have a large site with lots of inline styling because you will surely have your work cut out for you!
__________________
If my posts offend thee, I’m just blowing my own horn!
 
Reply With Quote
  #5 (permalink)  
Old 02-23-2010, 02:57 AM
TimothyJohn's Avatar
Contributing Member
Latest Blog:
None

 
Join Date: 02-17-10
Location: *** Perth AU ***
Posts: 394
iTrader: 1 / 100%
If it is out side your source code it is easily accessed and affects all pages that are linked to it. If it in Inline you have to rewrite it every time and over and over to change it.
 
Reply With Quote
  #6 (permalink)  
Old 02-23-2010, 06:04 AM
ScriptMan's Avatar
Super Moderator
 
Join Date: 02-10-07
Location: Central Kentucky
Posts: 10,069
iTrader: 4 / 100%
Ditto everything Tutor said.

In addition to that I am convinced it makes for faster page loads as most if not all browsers cache the CSS file and all that information is not transferred each time a page loads.

The only way I would use inline is on a placeholder site of no more than a few pages. I'm not a CSS expert but I am sold on the external style-sheet.

For those of you who might choose to modify a group of pages there are bulk replace options available in several of the free text editors and there is a dedicated shareware program called multi-repalce. One need to use either with caution and keep back-ups until you have it working.
__________________
SEO does not mean Spam Everywhere Online
Scriptman's Playhouse || Ramblings from an old man
2013 resolution: Don't feed trolls
ScriptMan
 
Reply With Quote
  #7 (permalink)  
Old 02-23-2010, 11:52 AM
firecat's Avatar
Contributing Member
 
Join Date: 05-25-08
Location: Massachusetts
Posts: 143
iTrader: 0 / 0%
Came over to see if there was anything I could add to this discussion but found that everything I could say has already been said.

On the other hand, I wasn't aware of the multi-replace shareware, so I've learned something new.
 
Reply With Quote
  #8 (permalink)  
Old 02-24-2010, 12:23 AM
Banned
Latest Blog:
None

 
Join Date: 02-21-10
Posts: 141
iTrader: 0 / 0%
it is the very interesting question and mostly students become confusion when they give answer of this question.
it looks like very simple but is not.
so i want to give the the answer of this question..
the benefits of using an external style sheet vs. inline CSS
if we use external style sheet that if we want to change any look of website as colors,font size so we can change it without doing affected main coding.
another benefit is that u can add your style multiple pages of any web site by using <link>.
if we use the inline css then if we do change any then we have to change in each file and the size of any web page is also become large.
maintenance of any web site is not easy.
some benefits is using inline is also..
i think my answer is appropriate according to my opinion ...
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS -- Organizing Style Sheets c-low Web Design Lobby 9 06-12-2007 06:18 AM
CSS and SEO - is hiding text with style sheets dangerous?? c-low SEO Forum 6 09-29-2006 12:54 PM
Style Sheets raciviusdawn Coding Forum 9 01-14-2004 04:07 AM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 01:48 AM.
Powered by vBulletin
Copyright © 2000-2013 Jelsoft Enterprises Limited.
Copyright © 2003 - 2013 Escalate Media LP




Search Engine Optimization by vBSEO 3.6.0 RC 2 ©2011, Crawlability, Inc.