Quoting my other answer in stackoverflow:
Recently having to perform maintenance on older code, I found that using comments at the end of a div tag really made it difficult to comment out large sections of code thanks to HTML not having nestable comment tags. So, I got into the habit of modifying the comments into hidden spans at the end of large block divs.
<div class="modal fade" id="dialog_edit_group">
<div class="modal-dialog">
<div class="modal-content">
...HTML content here...
</div><span title=".modal-content" HIDDEN></span>
</div><span title=".modal-dialog" HIDDEN></span>
</div><span title=".modal #dialog_edit_group" HIDDEN></span>
<!--
<div class="modal fade" id="dialog_edit_group_OLD">
<div class="modal-dialog">
<div class="modal-content">
...HTML content here...
</div><span title=".modal-content" HIDDEN></span>
</div><span title=".modal-dialog" HIDDEN></span>
</div><span title=".modal #dialog_edit_group_OLD" HIDDEN></span>
-->
I put the "HIDDEN" HTML5 attribute in there so if others modify it and add text for some reason, the contents will usually stay hidden. I made it ALL CAPS so that it would stand out a bit more as if to shout "COMMENT HERE!". Yes, it does create a DOM element that now has to be maintained by the browser, but its a small price to pay during heavy active website development.
Using "end div comments" as such conforms to the HTML standard, gives me greater readability and allows me to use the HTML comment tag to disable large blocks of the page to aid in development. Maybe it will be useful for others as well.