This is a blog that was created to talk about web design. The both of us hope people can learn from this, even learn something ourselves maybe.

Tuesday, February 08, 2005

Taking Advantage of Google

Ok bear with me on this, might take a bit to explain.

I'm sure you are aware that the methods of "ranking" that Google uses are quite complex, algorithms that would make Einstein's head burst. They USED to do these ranks based solely upon META tags, back in the Search Engine Dark Ages (1997/98). Unfortunately this can easily be fooled, and people just started abusing the META tags, repeating phrases to increase the keyword concentration.

As we living beings evolve, so does the code, and Google now uses methods that parse out the text in the page, then parse out the headers (h1, h2, h3) to see what is "weighted". H1 should appear first, H2 second, etc., in a real semantic flow down the document. Someone who adds in H1 all over the place will actually suffer because of the malformed document.

There are tricks though, which are very useful. Let's say you don't want to use a section header, or you want all text to be the same size, no h2, h3, etc., Well here's one way to have them in your document but NOT show up; put this in your document:


<h1><span>Some Header Here, Widgets For Sale!</span><h1>


This is an H1 with a span inside it. Then put this in your css file:


h1 span {
position: absolute;
overflow: hidden;
clip: rect(0,0,0,0);
height: 0;
padding: 0;
margin: 0;
}


What does this do, and more importantly, what's the point? Well the position:absolute; sets the H1 span outside of the "flow" of the document. Using the clip:rect(); attribute we set the size of the H1 span to 0, especially in IE5.5 which doesn't recognize the height:0; directive. And the height:0; is there because clip:rect() doesn't work in IE6.

When the parser (google) comes across the page it correctly "sees" the H1, lending it "weight" in the ranking system (because it's there). Make it relevant; if your page deals with widgets, add like I did, "Widgets for Sale!" in the H1. Preferably, if you have a paragraph (<p>) after the H1, also add "Widgets" in the first line, which will help with the page rank too.

All in all, this is an effective way of helping your pagerank, even if you don't want to use H1, H2, H3 (or if you can't, or it's not applicable). It's hidden from everything except the parser, even the Command Line Browsers such as lynx.

0 Comments:

Post a Comment

<< Home