3 ms·
In XHTML, the </p> is required. In HTML, some people prefer to close all tags for cleanliness; others prefer to leave the <p> open. It's really a personal prefe
by mcav 17y ago
In XHTML, the </p> is required. In HTML, some people prefer to close all tags for cleanliness; others prefer to leave the <p> open. It's really a personal preference. Personally, I like the more minimal approach of leaving the closing tag out (one less thing to try to match up). Others like it to look like XML (everything closed).
As far as the original post's question -- that HTML snippet is perfectly fine.
- TeHCrAzY 17y agoI find unclosed tags to be ambiguous, hard to format, and that they lead to more errors, I'd be interested to see why you prefer working with the opposite, personal preference aside.
- mcav 17y agoI don't leave every tag open; just a few: tr, td, p, li. To me, it's intuitive that when the next row/listitem/paragraph begins, the first one ends. So I think this is perfectly readable: <ul> <li>Item1 <li>Item2 <li>Item3 </ul> <table> <tr> <td>Foo <td>Bar <td>Baz <tr> <td>Foo <td>Bar <td>Baz </table>