Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

This is a silly question but i am bit confused. Can any explain What is the disadvantages of removing HTML tags before indexing the pages?

Thanks in advance.

share|improve this question
    
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
add comment

migrated from stackoverflow.com Nov 17 '10 at 19:49

This question came from our site for professional and enthusiast programmers.

2 Answers

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.

share|improve this answer
add comment

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.

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.