html-tag-names
List of known HTML tag names
What it is and what it does
html-tag-names is a simple data package that exports a list of 148 known HTML tag names, covering both legacy tags (like `basefont` and `nextid`) and modern ones (like `template` and `shadow`). It is a Python port of the npm package of the same name and includes tags from across all versions of the HTML standard.
The package has no runtime dependencies and is intended for use cases where you need to validate or enumerate valid HTML tag names programmatically. It is most useful in HTML parsing, validation, or generation tools where you need to check whether a given string is a recognized HTML tag.
Use it for:
- Validate user input or parsed markup to check if a tag name is a recognized HTML element.
- Generate or filter lists of valid tags in HTML parsing or linting tools.
- Build HTML template engines or code generators that need to distinguish valid tags from custom elements.
- Create documentation or reference tools that enumerate all standard HTML tags.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a curated list of valid HTML tag names across all HTML versions, from ancient tags like `nextid` to modern ones like `shadow` and `template`.
Yes, if you need a simple, dependency-free reference of valid HTML tag names. The package is stable (no vulnerabilities, low install friction), but be aware it is dormant—last release was 2022-03-09—so it will not track future HTML spec changes. Avoid if you need an actively maintained, up-to-date tag list or if GPL-3.0-or-later licensing conflicts with your project.
Install
html-tag-names on PyPI
pip
pip install html-tag-namesuv
uv add html-tag-namespoetry
poetry add html-tag-namesInstalling html-tag-names
Before you install
Low friction: pure Python, no runtime dependencies, and packaged as a wheel. Maintenance is dormant—last release was 2022-03-09 and last commit 2024-10-08—so expect no active updates, though the data itself is unlikely to change frequently.
License in practice
Licensed under GPL-3.0-or-later (copyleft). Any derivative work or bundled distribution must also be GPL-compatible; this may restrict use in proprietary or closed-source projects.
Quickstart
from HtmlTagNames import html_tag_names
print(len(html_tag_names)) # => 148
print('a' in html_tag_names) # Check if a tag is valid
Verify before relying
- Whether the tag list is kept in sync with the HTML living standard or if it reflects a snapshot from a specific date.
- Whether the package is actively maintained or if dormancy means the tag list may lag behind new HTML specs.
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 | 443,462/month — #6,629 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: html_tag_names-0.1.2-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-void-elementsProvides a list of HTML void element tag names…
copyleft · top 15,000 on PyPI
flake8-variables-namesA flake8 extension that detects poorly named…
permissive · top 15,000 on PyPI
bleach-allowlistProvides curated allowlists of HTML tags,…
permissive · top 5,000 on PyPI
html-sanitizerSanitizes HTML fragments by enforcing an…
permissive · top 5,000 on PyPI
meld3meld3 is an HTML/XML templating system that…
permissive · top 15,000 on PyPI
mdurlProvides URL parsing and manipulation utilities…
permissive · top 100 on PyPI
json2htmlConverts JSON data structures into HTML tables…
permissive · top 5,000 on PyPI
sphinxcontrib-serializinghtmlA Sphinx extension that outputs documentation…
permissive · top 1,000 on PyPI
curlylintLints HTML templates in Jinja, Nunjucks,…
permissive · top 15,000 on PyPI
pytest_taggingA pytest plugin that lets you tag tests with…
permissive · top 15,000 on PyPI