HTML commenting : Let's all do it

Posted Dec 15, 2011 | ~1 minute read

I've come across this time and time again, and i know i don't necessarily do this every time, but if you're working on a complex layout please please please comment your code! It makes future work for yourself, and other developers much easier.

In case it helps, this is the standard i tend to use:

<div id="header">
    <h1>Site Title</h1>
    <p class="subtitle">Subtitle</p>
</div> <!-- @end #header -->

Nice and easy, doesn't take much time to write and makes scanning through HTML much faster for everyone.

Right, as you were...