I came across a code where a developer attempted to close an empty table cell like this <TD /> instead of <td></td>.
Is <td /> valid? When is it appropriate to close a tag like <tag />? What language does it come from originally?
Non-HTML Compatible XHTML (so not if you want to use a text/html content-type or support IE 8 or older).
If an element permits content (e.g., the div element) but an instance of that element has no content (e.g., an empty section), DO NOT use the "minimized" tag syntax (e.g.,
<div />).
— http://www.w3.org/TR/xhtml-media-types/#C_3
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With