M = ElementMaker(namespace=None, nsmap={None: 'http://www.w3.org/1999/xhtml'})
html = M.html(E.head(E.title('Test page')), E.body(E.p('Hello world')))
Recommended way to generate XHTML documents with lxml