[thelist] HTML Comments and Double Hyphens on Netscape 6.1 and 6.2

Ray Hill ray.hill at informative.com
Thu Jun 20 17:13:01 CDT 2002


<tip type="HTML Comments and Double Hyphens on Netscape 6.1 and 6.2">

There appears to be a bug in Netscape 6.1 and 6.2 regarding the contents of
an HTML comment.  Apparently, if you have two consecutive hyphens within an
HTML comment, it ignores the closing comment tag.

So something like this:

   <!-- Header Table -- Begin -->
   <table border="0" cellpadding="0" cellspacing="0">
     <tr>
       <td>SOME CONTENT</td>
     </tr>
   </table>
   <!-- Header Table -- End -->

Will actually not show up at all, since the browser thinks the first one
didn't close and doesn't show the comment until the second comment tag.

So if you have to use hyphens in your comments, NEVER use two of them next
to each other.  Changing it to:

   <!-- Header Table - Begin -->
   .....
   <!-- Header Table - End -->

will make it work properly.

</tip>



More information about the thelist mailing list