Firefox more sensitive to malformed comment tags
February 01, 2006
CSS | Web Building

Firefox is much stricter in parsing comment tags than Safari or IE.
Comments should have 2 hyphens after the exclamation point, no more, no less, and there should be no hyphens within the body of the comment.

So:
<!--
is OK, but
<!----
is not, particularly in Firefox.

Example 1 shows a table surrounded by a properly formed comment tag.
Example 2 shows the same table surrounded by a tag with too many hyphens - the table and all code between comment tags disappears - in Firefox.


Ads by Google

Posted by ellen at February 01, 2006 01:03 PM

View the code source in Firefox to see how firefox colorizes the code:


With properly
formed comment tag:



Improperly
formed tag:


Ads by Google


Ads by Google

 RSS   |   Contact Me


Ads by Google