logoalt Hacker News

osxmanyesterday at 9:28 AM1 replyview on HN

It would be nice though, to close 'm ... Makes it more readable and less prone to mistakes.


Replies

bmachoyesterday at 10:09 AM

Article actually argues/states that a lot of the times not closing elements is more readable. It mentions tables without a concrete example, but I think e.g.

  <table>
    <tr> <td> A1 <td> B1 <td> C1
    <tr> <td> A2 <td> B2 <td> C2
    <tr> <td> A3 <td> B3 <td> C3
  </table>
is valid and reads better than if the row and data elements were closed (and on separate rows because it would be too much noise otherwise) (of course the whitespaces are different, if they matter for some reason). For a 3x3 table 5 lines vs ~15 lines.
show 1 reply