If I have a span tag like this:
HiSecondLine
And I call this jQuery function:
var ht
It doesn't. It just modifies the browser DOM.
It is up to the browser to serialise the DOM to HTML or XHTML as it desires when using innerHTML. Different browsers act differently.