3 ms·
The funny thing is that as an HTML page gets increasingly large and complicated, I frequently see developers add HTML comments demarcating precisely which eleme
by gr366 16y ago
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.
- pmjordan 16y agoAn 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.