kalpaitch
kalpaitch

Reputation: 5271

issue in firefox with commenting out html

I have an issue in firefox and not in IE, didn't think I'd hear myself say that one, where if I have an commented section in my html like so:

<!--------------form--------------->
<div id='form'>
etc etc.
</div>

<!------------main content----------------->

The area in between the two comment tags is being completely struck out. What am I doing wrong?

Upvotes: 1

Views: 379

Answers (2)

Lucas Jones
Lucas Jones

Reputation: 20193

Try removing the extra -s. (ie, keep <!-- and -->, but change the rest to spaces or something.)

Upvotes: 1

Konrad Rudolph
Konrad Rudolph

Reputation: 545618

Remove the dashes inside the comments, it will work then. I’ve forgotten the exact rule but basically double dashes inside comments are not allowed and cause problems.

<!-- form -->
<div id='form'>
etc etc.
</div>

<!-- main content -->

Read the relevant section in the standard.

tl;dr: Firefox is right, MSIE is broken.

Upvotes: 6

Related Questions