html-void-elements
List of HTML void tag names.
What it is and what it does
This package is a Python port of the npm `html-void-elements` package, providing a curated list of HTML void element tag names—tags that are self-closing and do not have closing counterparts (like `br`, `img`, `input`, `meta`, and others). It includes both historical tags (e.g., `basefont`, `nextid`) and modern ones (e.g., `template`, `shadow`) drawn from the HTML living standard.
The package is a simple reference list with no runtime dependencies, designed for developers who need to validate or identify void elements during HTML parsing or generation. It supports Python 3.7 through 3.10 and has been stable since its single release in March 2022.
Use it for:
- Validate whether an HTML tag is a void element during parsing or generation.
- Filter or categorize HTML tags by their self-closing status in a document processor.
- Reference the canonical list of void elements when building HTML sanitizers or validators.
- Check tag names against the standard when implementing HTML template engines or linters.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a list of HTML void element tag names (self-closing tags like `br`, `img`, `input`) for validation or reference in HTML processing.
Yes, if you need a reliable reference list of HTML void elements. The package is minimal, dependency-free, and carries no known vulnerabilities. The main caveat is dormancy: it has not been updated since March 2022, so if the HTML living standard has added new void elements since then, this list may be incomplete. For most HTML processing tasks, the list is likely sufficient.
Install
html-void-elements on PyPI
pip
pip install html-void-elementsuv
uv add html-void-elementspoetry
poetry add html-void-elementsInstalling html-void-elements
Before you install
Low friction to install; the package is dormant (last release 2022-03-09, last commit 2024-10-08) but carries no runtime dependencies and is stable for its narrow scope.
License in practice
Licensed under GPL-3.0-or-later (copyleft). Any software that incorporates or modifies this package must also be distributed under a compatible copyleft license.
Quickstart
pip install html-void-elements
from HtmlVoidElements import html_void_elements
print(html_void_elements) # Returns list of void tag names
Verify before relying
- Whether the list is kept in sync with the HTML living standard after the 2022 release date.
- How completeness compares to other HTML tag reference packages or the official spec.
Package facts
| License | GPL-3.0-or-later (copyleft) |
| Python support | supports the current Python release (>=3.7,<4.0) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | dormant — 1,619 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 442,692/month — #6,633 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: html_void_elements-0.1.0-py3-none-any.whl
Tags
More HTML packages
MarkupSafe provides a text object that escapes…
permissive · top 100 on PyPI
Jinja2Jinja2 is a templating engine that renders…
permissive · top 100 on PyPI
beautifulsoup4Beautiful Soup parses HTML and XML documents…
permissive · top 100 on PyPI
lxmllxml provides Python bindings to libxml2 and…
permissive · top 1,000 on PyPI
docutilsDocutils converts plaintext documentation in…
unclear · top 1,000 on PyPI
MarkdownConverts Markdown text to HTML using a Python…
permissive · top 1,000 on PyPI
html-tag-namesProvides a curated list of valid HTML tag names…
copyleft · top 15,000 on PyPI
html-sanitizerSanitizes HTML fragments by enforcing an…
permissive · top 5,000 on PyPI
tinyhtmlRenders HTML5 safely from Python expressions…
permissive · top 15,000 on PyPI
meld3meld3 is an HTML/XML templating system that…
permissive · top 15,000 on PyPI
flake8-variables-namesA flake8 extension that detects poorly named…
permissive · top 15,000 on PyPI
Selenium-ScreenshotCaptures full-page or element-level screenshots…
permissive · top 15,000 on PyPI
fill-voidsFills interior voids in 2D and 3D binary images…
copyleft · top 15,000 on PyPI
nulltypeDefines custom null and sentinel values that…
permissive · top 5,000 on PyPI
sphinxcontrib-videoA Sphinx extension that embeds HTML5 videos…
permissive · top 15,000 on PyPI