Possible Duplicate:
Why should we use tags like p, span, hx tags when we can use CSS instead?

Do you think that is actual difference between, as example

<span class="aaa">Hello!</span>,
<span class="bbb">welcome</span>
to my
<span class="ccc">fantastic</span>

and the simplest possible one

<h1>Hello! welcome to my fantastic website!</h1>


thank you in advance HAPPY NEW YEAR


From an SEO perspective, it doesn't matter too much. There's some speculation that, in general, a high content-to-markup ratio is better for SEO. But I've seen no real evidence for this. This often repeated statement is probably generalized from the fact that high quality pages generally have lots of content, and pages with lots of content will have a high content-to-markup ratio.

It's also possible that this popular conception originated from the days when major search engines only indexed the first X bytes from your page. While this may still be the case to an extent, the limit is generally high enough that for all practical purposes, it's a non-issue (if it is, then you're either a corner case or you're doing it wrong). Anyway, see John Mueller's comments on the issue here.

That said, you rarely see the style of markup you propose because:

  • A heading is a heading. Headings are short labels for a section of content, and there's rarely any need to specially style different parts of it. That isn't to say that there's never a circumstance where it might be required/appropriate, however, just that in generally it's not needed.
  • Semantic markup dictates that your markup should be structured according to the smeantics of the content. Again, a heading is a heading. There usually aren't complex semantics involved. So it's likely someone using that style of markup is violation the separation of presentation and content, and the classnames aaa, bbb, and ccc are probably presentational descriptions (e.g. grey1, grey2, grey3, or big, small, underlined, etc.), in which case it's no different than using <b>, <ul> or <i> really.
  • Lastly, manually inserting such tags into each heading is going to be very time consuming for little to no reward. I suppose if they're arbitrarily inserted, then that process can be automated, but what would be the point?

So there are plenty of reasons not to do it, but SEO isn't one of them. It's not likely to add any semantic information to the document, so the search engine will just strip out the tags and treat it as "Hello! welcome to my fantastic website!" in either case.

Edit: As you mentioned, for semantic information there is some overlap in functionality between HTML5 microdata and using classnames as per microformats. You just have to decide which is more appropriate in a particular scenario based on features, markup length, support, and difficulty in implementing each.

Here's an example from Google's Webmaster Tools help of how you can convey the same semantic information about a recipe using microdata, microformats, or RDFa.

| improve this answer | |
  • thank you for your answer, so there is no difference, except for the code weight... my code is already light and I have a lot of content. what I need is visually differentiate two words of a name of a car (with CSS): <h1><span>Mazda</span> <span>Miata</span></h1> – user12370 Dec 31 '11 at 7:38
  • That is a potentially valid use of such markup. However, I would be sure to apply a semantic classname to the span, e.g. <span class="make">Mazada</span> <span class="model">Miata</span>. It's mainly a stylistic choice at present, but it's good practice to use semantic classnames to future-proof your markup for potential new microformats or other semantic web applications. – Lèse majesté Dec 31 '11 at 7:45
  • I don't think that "class" attributes are read by bots. In future they will read the html5 microdata attributes (item*=""). and what about multiple <a> inside the H1 tag? <h1><a href...>Mazda</a> <a href...>Miata</a></h1>? In any case, thank you for your help! – user12370 Dec 31 '11 at 8:11
  • HTML5's microdata attirubtes will help achieve something similar, but class names have long been a standard way of including semantic information, and it's something that user-agents and other content processors already implement. In this case, using class names would be more appropriate since there's no extra meta data to be added. – Lèse majesté Dec 31 '11 at 8:29

Try to use styled or bold tagd just for special keywords... the load speed of the page is important too.

| improve this answer | |
  • <h1><b>Mazda</b> <u>Miata</u></h1> seems a little spammy. It is not? – user12370 Dec 31 '11 at 7:42
  • I mean inside other tags like <divs> or <p> if you use <h1> for some title that tag has their relevance for SEO, you don't to use <b> inside – juanjosezg Dec 31 '11 at 7:48