There are several hundert ways how you could create HTML.
I have not found the perfect way yet.
This page contains some ways to create html programmatically.
- https://github.com/Knio/dominate
- https://github.com/basxsoftwareassociation/htmlgenerator
- https://github.com/ejplatform/hyperpython
- format_html()
- Django Templates
- Jinja Templates
- Template Literals
I think for a lot of use-cases php is a good solution, although I prefer Python.
jsonnet is a language inside json to create json.
Something like this could be cool. But it should be a bit better than php.
I would love to have such a great templating solution for Python: html/template
My current prefered way is Django's format_html()