The Truth about CSS and SEO
| Posted by: Suzanne James |
It can be a nightmare. Your web design company charges more than $2000 for a website – and the code is so bad that MSN won’t even look at you, and the SEO pros claim you need hours of rewrites. In a perfect world, CSS and SEO should work hand in hand, but they rarely do.
The simple explaination of why it is important to reduce code on a page is: a) crawlers leave slow loading websites, only indexing part of the pages, b) some crawlers read the first 500 characters/words of code and leave, c) The content at the top of the page is considered the most important. Almost all webmasters will give one of those answers.
The CSS reduces the code and increases the styling. It should offer the best of both worlds.
• Reduce code
• Most important ranking content to top of HTML file
• Makes pages lighter
• Decreases code to content ratio
• Uses Heading tags < h1 >indicating important content.• Moves content closer to the top of the page
Common CSS and SEO Mistakes
• Hundreds of characters of code before content
• Code does not ‘signal’ important content
• Images do not include alt tags
• CSS is used to hide text
• CSS files are not used, each page has repetitive CSS code on the page
The problem is that most webmasters do not realize that CSS allows them to put their menu code at the bottom of the page. Using
< div >elements can put major content at the top of the page.< / div >
Pure CSS CODE
#content {
margin-top: 10px;
margin-left: 120px;
width: 500px; }
#nav-menu {
position: absolute;
left: 10px;
top: 20px;
width: 150px; }
#nav-menu ul {
list-style-type: none;
padding: 5px;
margin: 5px;
width: 150px; }
Webmasters who prefer HTML can put use the following code:

This div illustrates an overlooked SEO principle. By appearing as the summary code, has good SEO value. Argue that this is hidden code, but I see it the same as comment code.









August 23rd, 2008 at 8:45 am
SEO and css should be taken care of by the solution you chooses for your site. Sticking with the open source alternatives (wordpress for blogs and Joomla for sites for instance) guarantees that this is taking into account. It’s easy AND cheap.
September 16th, 2008 at 2:28 pm
There are a few big frustrations when working with poorly designed sites. One of the biggest frustrations can arise when a site uses CSS and ID’s or Classes for multiple elements that do not need a class or ID at all. For example, some designers will assign a class to every paragraph inside a div that has a unique ID. Instead of using the div’s ID to target the paragraph tags, they use the class assigned to the paragraph. It is an issue of ignorant designers who think they understand CSS. Also, the CSS generated by visual editors is even worse.