as per the title; is it possible to have nested comments in valid HTML? see the example below...
<p>some text</p>
<!-- comment 1
<p>commented out html</p>
<!-- comment 2
// are nested html comment allowed?
end of comment 2 -->
<p>more commented out html</p>
end of comment 1 -->
<p>some more text</p>
It appears not, does anybody know how I could get nested comments to work?
When you nest a comment, replace "--" with "- -". When you un-nest, reverse the procedure. It's not the <!--
that is forbidden but the --
.
Example:
<!-- some stuff
<!- - some inner stuff - ->
<!- - a sibling - ->
the footer -->