concise html tag generation
Project description
html-tags
[!WARNING] This project is under active development - Mar 2026
Concise HTML generation for Python.
from html_tags import setup_tags
setup_tags()
page = Html(
Head(Title("hello")),
Body(
H1("hello world", cls="title"),
Button({"data-on:click": "@delete('/1')"})("delete"),
)
)
Tags are immutable and composable — call a tag to add children or attributes:
Div(cls="card")("some content", id="main")
Datastar SSE helpers included:
from html_tags import patch_elements, patch_signals, datastar_stream
Install
pip install html-tags
uv add html-tags
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
html_tags-0.0.7.tar.gz
(3.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters