Comment tag is an html code that describes or documents content. The code is written in between <!-- -->. Comment tag is invisible to the user and can only be seen in the code itself. Browser doesn’t display any code within comment tag. However search engine indexes all text within comment tag. You can use comments to explain your code, which can help you when you edit the source code at a later date.
Generally comment tag is written as,
<!—this is comment tag -->
Since search engines indexes the text in comment tag, we can use keywords and key phrases in comment tag. This will increase the keyword density and ultimately page can rank higher than others.
Comment tag can be used anywhere in the document right from title, description and head tag. It is generally used when it is not possible to place keywords in these tags. For example if the site is about HTML and keywords are HTML, comment tag, SEO, and Web Designing. The page is about ‘Comment tag’ and title is ‘HTML tags’. In this case we can use comment tag <!-- it is about Comment tag -->. Here this text will not be displayed to the user but search engines can read this text and certainly believe that the content is more relative. We can also use it before the starting of important content like before flash content, programming in JavaScript, ASP or Applet, images and for those sections we need to identify for easy access.
But using comment tag to optimize the website has become an outdated practice. Many of the search engines have changed their algorithms and they are not ranking pages based on use of keywords in comment tags. Inktomi is the only search engine that still considers comment tags to boost search engine rankings of the web site. The main reason behind changing algorithm is its misuse. Often inserting a comment tag inside a font tag will not make it a comment tag anymore. It will get treated as any other text in the document.
|