Re:Writing HTML by Hand
by erhaetherth on Thursday September 21, 2023 @03:05AM
(#37594132)
Is there an HTML formatter that'll strip unnecessary closing tags?
I used to be team semi-colon in JS but I've switched teams now and have my formatter strip them. There's like 1 or 2 edge cases where that can bite you but practically speaking it's a non-issue. The real downside is that I sometimes get lazy when writing C++ and that very much dislikes poor punctuation.
Personally I've come to appreciate that many closing tags are unnecessary in HTML. Makes many constructs much more concise. Especially with tables:
``` <table> <caption>Some letters and numbers <thead> <tr> <th>Letters <th>Numbers <tbody> <tr> <td>A <td>1 <tr> <td>B <td>2 <tr> <td>C <td>3 </table> ```