$append() inconsistent behavior

$append() inconsistent behavior

I have discovered that if you use $('body').append("<table>"); a full table element is appended ie debuggers show that both <table> and </table> are present.

But if you use  $('body').append("<tr>"); only the opening tr is created.

You have to use 

$('body').append("<tr></tr>"); to get the full element.
If you use 
$('body').append("<table></table>"); then the closing tag gets duplicated.

I noticed this with some other HTML elements as well.

Why does append() show this difference depending on what is appended and how can i know which elements will behave in each way?