I have a site that uses span tags mid heading to put a different style on the words.

So for the sake of argument I have a keyword/phrase of knitting patterns:

<h1><span>Knitting </span>Patterns</h1>

From an SEO point of view would this still work or would search engines split the two words?

  • 2
    The H1 will be seen as one but counted as two words because of the space. Also, the space should be after the closing span not inside. Nov 8, 2014 at 17:18
  • Why would the position of the space be important? Nov 8, 2014 at 19:07
  • 5
    Well it's not that important and either will be accepted by the search engines, but as general practice I wouldn't advise on it either, because certain styling to the span element would also appear on the space character, it makes sense only to stick the word you actually want to style. Nov 8, 2014 at 19:44

2 Answers 2


Stick with me. This all makes sense I promise. Google when it indexes your content pages, does not just look at words, but proximity of words, phrases, language, style usage, and so forth. They do this for each page and each site and over time, certain patterns begin to emerge. You may, without realizing it, use a phrase that is heavily Germanic that is common for your area in, say, the U.S. and Google will recognize this and understand it for what it is. Google will index each word, then the proximity of each word, then the phrases including some you never knew existed.

Since the days of Google Scholar, and trust me when I say the AI (artificial intelligence) behind scholar and what has been added since is immense, has made language recognition far more sophisticated. Google understands your content in ways unimaginable.

Google uses the same technology when a user searches. Let's keep it simple though.

A user enters a search into Google. Google reads the search terms from left to right because for most of us that is how we learned to read and hence we think that way. There are exceptions for this of course and Google can account for the exceptions. Google then assigns an importance metric to each word higher from left to lower to the right. Google then applies a phrase recognition pattern match and usage order to the search terms based upon search history and patterns found in the index and can optionally increase the importance metric of each word and in effect reordering the search based upon the metric. This covers issues with phrases being used one way here, and another way in another place in the world. Google will recognize any phrase no matter what and account for it.

So to use your example, assuming your site performs well for knitting patterns, any search would return in the search engine results page (SERP) the pages with phrase usage first since the importance metrics have been raised to recognize the phrase then single word matches after the better phrase matches are exhausted. You can easily recognize this in searches you perform. So knitting patterns will rank higher in the SERPs because it is a recognized and commonly used phrase and then likely knitting then patterns according to the importance metrics assigned from left to right (both search and content usage) unless the user searches for patterns knitting (which is not likely) in which case patterns could be returned before knitting or possibly reordered back to knitting patterns because the search order does not match common usage in content.

The only effect on ranking would be if you used patterns knitting and the world uses knitting patterns. This is because exact matches are often shown first.

I should also add that only some HTML tags are taken into account during indexing content. These are header tags and paragraphs and breaks or any other tag that helps recognize content format rather than content display. Search engines want to understand you content much like it was written in a formatted text editor such as wordpad. In your case, any span tag would be ignored when a search engine indexes the content because it does not signal format but rather display.

  • 1
    @LightnessRacesinOrbit I thought it might be best to help you understand my thought a bit more. It is unlikely to recognize a Germanic phrase in southern California with all the narley, totally tubular, rad, and what nots, but very easy to recognize in the phrase in the U.K., Australia, or even in the Philippines. It was just an example since here, we are not tied to specific languages as tightly as other areas and do not recognize origin or specific usages. For search engines, especially ones designed and created in the U.S., language must be recognized even in the unlikely of places.
    – closetnoc
    Nov 8, 2014 at 18:13
  • 8
    @closetnoc: Um, no mate, bear is definitely the correct form here. The noun is an animal; the verb means to carry or to endure (as in load-bearing). The phrase "bear with me" means "endure this pain with me because it will be worth it in the end". By starting your answer "bare with me", you are inviting your readers to get naked; surely this is not your intent. Nov 8, 2014 at 18:26
  • 1
    @LightnessRacesinOrbit As it turns out, it depends on if your are English or German (amongst others). English bear, German bare (from a different root). I am a lot of things including Italian, but I am equally mostly English/Scottish and German but raised German and speaking German (though for the life of me, I cannot even remember the bad words). As it turns out, both can be right. See why it is so important for Google to understand language and phrases?? This is the perfect case!
    – closetnoc
    Nov 8, 2014 at 21:39
  • 2
    @closetnoc: Your answer is written in English, not German. The English word doesn't change spelling just because you are biologically German. Nov 8, 2014 at 21:50
  • 3
    @closetnoc: What. The phrase is spelt "bear with me"; end of story. Nov 8, 2014 at 22:40

Search engines will consider the phrase within the heading. Spans are not used to break up phrases. According to the HTML spec, spans mean nothing on their own.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.