Welcome to WebmasterWorld Guest from 54.146.201.80

Forum Moderators: not2easy

Message Too Old, No Replies

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)

New User

5+ Year Member

joined:Sept 10, 2007
posts: 16
votes: 0


I found an older post on this topic but little discussion:
[webmasterworld.com...]

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)

Senior Member from KZ 

WebmasterWorld Senior Member lammert is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Jan 10, 2005
posts: 2886
votes: 1


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)

Preferred Member

5+ Year Member

joined:Dec 10, 2007
posts:507
votes: 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)

Senior Member

WebmasterWorld Senior Member swa66 is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Aug 7, 2003
posts:4783
votes: 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)

New User

5+ Year Member

joined:Sept 10, 2007
posts: 16
votes: 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!