skillfed

html-void-elements

List of HTML void tag names.

html-void-elements v0.1.0 442.7K downloads/30d#6,633 on PyPI2
Copyleft license GPL-3.0-or-later DORMANT released

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-elements

uv

uv add html-void-elements

poetry

poetry add html-void-elements

Installing 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

License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

html void elements listself-closing html tagshtml tag validationvoid tag nameshtml element referenceempty html elements
html-referencetag-validation

More HTML packages