News for hackers. Stuff that matters.
Re:The thing I hate about HTML by gr366 on Thursday July 15, 2010 @11:06AM (#1518022)
The funny thing is that as an HTML page gets increasingly large and complicated, I frequently see developers add HTML comments demarcating precisely which element was just closed, so that in the future it's easier to insert elements at the right level of nesting. Example:

  </div><!-- End of #section-nav -->
Would it be a horrible thing if HTML supported an optional id or class attribute in the closing tag?

  </div id="section-nav">
Of course it would have to match to validate. Probably not realistic in that my guess is this wouldn't be SGML-backwards compatible.
Re:The thing I hate about HTML by pmjordan on Thursday July 15, 2010 @12:22PM (#1518255)
An editor with good tag matching should in theory solve this for you. Of course, HTML's complex rules of where a closing tag is required and where it isn't makes this a lot harder than the simple paren matching you'd need for S-expressions.