Forum Moderators: phranque

Message Too Old, No Replies

<.b.> or <span class="bold"> Which is better for SEO?

xhtml complience vs traditional style

         

Livenomadic

3:04 pm on Oct 28, 2004 (gmt 0)

10+ Year Member



Note: The errors in the exact coding are just to make sure that it displays as text.

I'm rewiriting my pages for better SEO and xhtml complience.

However I have run into a problem.

Previously to bold text, I wrapped it in <..b..> tags. However this is not xhtml complient, instead I have to use CSS.

<.b> Hi my name is chris</b> and I like chicken.

Instead I'll wrap the text in a class called "bold" which will font-weight bold the text:

<.span class=bold> Hi my name is chris <./span> and I like chicken.

This brought up an interesting question concerning SEO.

I know google likes it when keywords are bolded (via <.b> and that this helps SEO. However does google consider text which is bolded via CSS to actually be "bold" and thus gives it importance in SEO?

encyclo

3:11 pm on Oct 28, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<b></b>
is valid XHTML, both transitional and strict, so I'm not sure what problems you are experiencing.

Using a

span
element is semantically meaningless, and search bots don't read CSS (yet), so using
<span class="bold">
will not help you.

outrun

3:16 pm on Oct 28, 2004 (gmt 0)

10+ Year Member



I think you will find <b> is xhtml compliant.I use them all the time pages validate just fine.

regards,
Mark

<added>Must refresh before posting</added>

Livenomadic

4:00 pm on Oct 28, 2004 (gmt 0)

10+ Year Member



Really? *smacks head* Well I just feel like an idiot now...

photon

5:11 pm on Oct 28, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just wanted to point out that while
<b></b>
is a valid element in XHTML, some people would argue that using it violates the principle of separating content from styling.

Of course, so does using

<strong></strong>
as the equivalent of
<b></b>
. And both that and
<span class="bold"></span>
seem like an awful lot of bytes to waste just to get the same effect.