While working on this weeks homework, I had a couple of times when I lost track of which ending div tag went with the starting tag. I started adding it and commenting it as soon as I write it:
<div id="content"> </div> <!-- END content -->
I then add the content in between. This way, as the content gets very long, I still know which </div> goes with which <div>. In fact, I have also starting do this for other elements that might be long (tables, lists) in html and for code blocks in PHP.