2

This is a silly question but I am bit confused. What are the disadvantages of removing HTML tags before indexing the pages?

2
  • I'm going to give this benefit of the doubt and assume there is a question here. Either way it's probably better off on Webmasters. – Josh K Nov 17 '10 at 19:46
  • 2
    Can you clarify your question a bit? It's hard to understand exactly what you are asking. – John Conde Nov 17 '10 at 20:12
2

I can think of two good reasons.

  • By removing all the HTML tags you're removing all the semantics of the text.
    This disadvantages any ranking algorithm - all else being equal, a page with "Tree" in a heading is more likely to be about trees than one with "tree" in the text somewhere.

  • You're also discarding attributes that could be used to index.
    To illustrate, a link to an image of a tree might have alt text describing the tree. Discard the alt text, and your page might not show up in the search.

0

It depends on how you remove them. If you use a smart library, like jsoup or tagsoup or neko, you get nothing but benefit. If you use a bad library, it can lose your content for you.

2
  • Can someone expand on this? Those libraries seem to be HTML parsers. I don't see how their use was benefit search engine indexing. – Lèse majesté Nov 17 '10 at 23:50
  • 1
    By avoiding treating the tags as words in the index. E.g., searching for 'head' – bmargulies Sep 9 '11 at 22:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy