Trick I use to highlight keywords for the search engines

Cloud9

Newbie
Dec 7, 2008
18
5
Hi, I'm relatively new here, and this may already be common information, but here's a little trick I use to make keywords on my pages stand out for the search engines, without distracting my viewers.

Code:
.myclass b
{
   font-weight:lighter;
}

Code:
<div class="myclass">
Now I can make my <b>keyword phrases</b> stand out for the search engines, 
and still use <strong>bold</strong> text!
</div>

Have fun with it, and don't over-abuse :D
 
The first part is what you'd throw into your css file. Then the other part just shows the usage.

You'll have to rename the class to whatever your main content area's class is.
 
This is a funny hack. Hats off to you for the simplicity and no, I won't overabuse...
 
can you please explain the css thingy in layman's terms or what it does exactly do?


sorry i dont anything about css
 
Alright I'll attempt to explain it in laymen's terms.

.myclass b{} in CSS states the properties that any <b> tag falling within a <div class="myclaass"></div> will have.

We state that the properties of the b tag should not be bold, with font-weight:lighter;... so now we can use <b></b> to highlight keyword phrases, and they won't appear bolded to the user, just the search engines. If you actually want to use bold in your content, just use <strong> tags.

Try to keep your bold on only 10% of your content as well, and dont bold the same phrase twice per page, or if you do just reword it slightly.

These are just my tips and I base them on nothing!
 
Last edited:
I think you can also use this
Code:
.myclass b
{
	font-weight:normal;
}

For both <b> and <strong>
Code:
.myclass b,strong
{
	font-weight:normal;
}
 
You gotta use font-weight:lighter... I tried normal and that would be the "normal" for the element, so it would be bold.

Also I only make b tags lightened because I like to bold some phrases for the user so use strong.
 
Back
Top
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features and essential functions on BlackHatWorld and other forums. These functions are unrelated to ads, such as internal links and images. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock