Dominate is a Python library for creating and manipulating HTML docs
...Through the use of the += operator and the .add() method you can easily create more advanced structures. By default, render() tries to make all output human readable, with one HTML element per line and two spaces of indentation.