Generate and manipulate HTML documents and nodes