The language you have is not HTML, but the language that generates HTML. The language obviously supports if / else clauses that nest, since you are showing a very example of this. Thus, even if the language generating the HTML code itself does not have nesting comments, you can use conditional expressions to remove parts of it due to its execution, therefore suppressing the generation of this HTML code:
Suppose that the false token is the logical value false (replace the correct expression for false in the given template language):
{if false} {if $scenes} <!-- ... > {else} ... {/if} {/if}
Everything in the if false block is excluded from the output by the processor.
source share