If your document is XHTML, $('body').append('<img src="" />') will give you a properly closed <img /> tag, do you have an example where that doesn't happen? All manipulation on jQuery's side happens via the available DOM methods, from that point on the browser itself handles creating/altering/moving of elements.
On Dec 26, 8:42 am, Saledan <bastil...@gmail.com> wrote: > Maybe i don't understand well.. but .. sure it's html anyway, and the > browser render it without issue, but i mean that the tag closure in > xhtml stardard is different and in this way you don't follow the > standard.. > > thank you > Max > > On 26 Dic, 02:55, Klaus Hartl <klaus.ha...@googlemail.com> wrote: > > > Well, as long as you serve your so called XHTML as text/html it is > > HTML anyway, thus no need to worry about a thing. > > > --Klaus > > > On 25 Dez., 18:48, Saledan <bastil...@gmail.com> wrote: > > > > Hi, > > > just a question about xhtml validation. > > > I have an xhtml page and it has been validate. > > > Now i add with .append some image, i suppose that the img tag is in > > > html and not xhtml .. <img ... > and not <img ... />... is there a > > > solution to have all in xhtml format? > > > > thanks > > > bye > > > max