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:
Would it be a horrible thing if HTML supported an optional id or class attribute in the closing tag?
Of course it would have to match to validate. Probably not realistic in that my guess is this wouldn't be SGML-backwards compatible.
[ Parent
| on HN ]
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.