Forum Moderators: open

Message Too Old, No Replies

HTML Comments in Link Text

Will they cause issues with SE's, or be ignored.

         

ChadSEO

4:42 pm on Jul 1, 2005 (gmt 0)

10+ Year Member



My tech team would like to put html comments in some of our links, to help with some parsing that may need to be done. Why they want to do this is a long explanation that I don't need to go in to, suffice to say, I understand why they would want to do it, but it makes me nervous.

Essentialy, they want to do something along the lines of <!--(--><a href="page.html"><!--)-->Important Text<!--(--></a><!--)--> This is so they can pull out "Important Text" if need be. Regardless of WHY they want to do it, my concern is this will confuse the SE's, or could detract from the "Important Text", which does include important keywords. My gut instinct is to say no, but I was wondering if anyone had any experience with something like this.

Thanks!

pageoneresults

5:26 pm on Jul 1, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



HTML Comments are treated as markup by indexing spiders. There should be no issues to worry about other than excess code on the page.

One thing to be very careful of is how those comments are formatted...

White space is not permitted between the markup declaration open delimiter ("<!") and the comment open delimiter ("--"), but is permitted between the comment close delimiter ("--") and the markup declaration close delimiter (">"). A common error is to include a string of hyphens ("---") within a comment. Authors should avoid putting two or more adjacent hyphens inside comments. Information that appears between HTML comments tags has no special meaning (e.g., character references are not interpreted as such).

Reference