Add dom element in html using jquery

Please can someone tell me why this does not work

$(‘<div>Hello where is my soy latte?</div>’); inorder to add a Dom element to the page

this is an eg from the book Jquery Novice to ninja

$(‘<div>Hello where is my soy latte?</div>’).appendTo(‘body’);

You need to append it or prepend it to an element. Right now you are creating it, but not actually telling jQuery where to put it

or simply
$(‘body’).html(‘<div>Hello where is my soy latte?</div>’)

Many Thanks for your prompt answer

If you use this approach you will overwrite your existing HTML, since you specifically wanted to add to the dom, I suggest using appendTo or prependTo

just for learning purpose
is the simplest way to add html to the dom