<body>
1
<br/>
2
<br/>
<!--3-->
<br/>
4
</body>
In this example I want to ignore all the code from 1 to 4 as I did with 3 without removing 3 ignore tag.
<body>
1
<br/>
2
<br/>
<!--3-->
<br/>
4
</body>
In this example I want to ignore all the code from 1 to 4 as I did with 3 without removing 3 ignore tag.
The browser parses every <!--
as start of a comment and -->
as its end.
If you have comment inside another comment, like:
<!-- a
<!-- b -->
-->
the browser will parse:
<!-- a
<!-- b -->
as comment and print the -->
because he thinks the <!-- a...
is closed with b -->
.
You need to close the comment tag before the next comment and open again afterwards