homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

CSS - internal vs. external & SEO
Does internal css greatly harm a page or just a little?

 5:03 am on Jan 24, 2008 (gmt 0)

I found an older post on this topic but little discussion:

We have a site that has css being parsed into each page. It's dynamically parsed from the content management system and is generated by a .dll. The css is at the top of each page, BEFORE the <html> code and the head.

Concern: Some spider simulator tools show the css code in their reports, but others don't.

We understand that a link to an external file would be the ideal world, but due to the 2,000+ lines of code, we're not sure if it's worth the programming.

Does anyone have any idea about the "weight" or importance of this factor in SEO for search engines?



 9:53 am on Jan 24, 2008 (gmt 0)

The css is at the top of each page, BEFORE the <html> code and the head.

From my understanding, the CSS definitions should be in the <head> element, not before. Regarding SEO, I haven't heard of any pro's or con's of a long CSS definition inside the HTML code itself, but some shady SEO-ers prefer to put it in a separate robot.txt disabled file to prevent spiders reading their font size 1px, and other disputable code.


 11:01 am on Jan 24, 2008 (gmt 0)

Putting CSS into external files and linking to it only saves on bandwidth and file sizes. Helps with keyword density and also loading time.

While its not vital you do this, it certainly does help, especially when your file sizes are large enough already without another large amount of CSS in there.



 1:00 pm on Jan 24, 2008 (gmt 0)

Think of your visitors first: if you have multiple pages using the same CSS: make it external, it'll save on bandwidth, loading time and in general gives a better experience.

If all pages have different CSS it's probably faster and better to let it sit in the <head> section (not before).

As for search engines: that's a moving target that should aim to try to do the same than what your visitors like and dislike. So the long term strategy is to think of the visitors and not the currently implemented algorithms. They change and you'll know too late.


 4:38 pm on Jan 24, 2008 (gmt 0)

Thank you for the insight. We're contacting the company who programmed the CMS to inquire about this and determine if we can even change it. Their compiler puts the CSS before the <html> tags, and we'd prefer an external file. I believe improved keyword density and download time would surely help. Thanks again!

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved