Pure-Python HTML generation