concise html/svg tag generation
Project description
html-tags
[!WARNING] Under active development — Mar 2026
Concise, immutable HTML/SVG generation for Python.
from html_tags import setup_tags, setup_svg
setup_tags(); setup_svg()
page = Html(
Head(Title("hello")),
Body(
H1("hello world", cls="title"),
Svg(Circle(cx="50", cy="50", r="40")),
)
)
Tags are immutable — call to add children or attributes:
Div(cls="card")("content", id="main")
SVG elements self-close correctly (<line />) and shapes like Circle accept children for animations.
Datastar SSE helpers included:
from html_tags import patch_elements, patch_signals, datastar_stream
Install
pip install 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.14.tar.gz
(6.0 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