The `html-void-elements` library provides a Pythonic list of all known HTML void tag names, based on the HTML living standard. Void elements are a special category of HTML elements that do not have closing tags and cannot contain any content or child elements (e.g., `<img>`, `<br>`, `<meta>`). This library is currently at version `0.1.0` and offers a static list for use in parsers, validators, or other HTML processing tools. Its release cadence is infrequent, typically updating only when the underlying HTML standard for void elements changes.
pip install html-void-elementsVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to import and print the full list of HTML void element tag names provided by the library.
Change your import statement to `from HtmlVoidElements import html_void_elements`.
Filter the `html_void_elements` list to exclude deprecated or niche tags if your application targets a specific, modern HTML subset.
Be aware that the list provided is for tag *names*. The library does not enforce or imply any specific syntax for their usage (with or without a trailing slash) beyond listing the names themselves. Always refer to HTML specifications for correct markup.
Ensure the package is installed using `pip install html-void-elements` and imported correctly with `import html_void_elements`.
Replace hyphens with underscores in your import statement: `import html_void_elements` or `from html_void_elements import void_elements`.
The library exposes the list of void elements as `void_elements` (lowercase). Use `from html_void_elements import void_elements`.
If you need set-like behavior (e.g., for fast lookups or adding unique items), convert the list to a set first: `void_set = set(void_elements)`. To add to a list, use `append()` or `extend()`.
No dependency data recorded yet.