{"id":2968,"library":"html-void-elements","title":"HTML Void Elements List","description":"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.","status":"active","version":"0.1.0","language":"en","source_language":"en","source_url":"https://github.com/Riverside-Healthcare/html-void-elements","tags":["html","void elements","web development","parser","validator","frontend"],"install":[{"cmd":"pip install html-void-elements","lang":"bash","label":"Install with pip"}],"dependencies":[],"imports":[{"note":"The primary list of void elements is imported as 'html_void_elements' from the 'HtmlVoidElements' module, not directly from the top-level package.","wrong":"import html_void_elements","symbol":"html_void_elements","correct":"from HtmlVoidElements import html_void_elements"}],"quickstart":{"code":"from HtmlVoidElements import html_void_elements\n\nprint(html_void_elements)\n# Expected output: A list of strings, e.g., ['area', 'base', 'br', 'col', 'embed', ...]","lang":"python","description":"This quickstart demonstrates how to import and print the full list of HTML void element tag names provided by the library."},"warnings":[{"fix":"Change your import statement to `from HtmlVoidElements import html_void_elements`.","message":"The package imports the list from `HtmlVoidElements` (capitalized) instead of `html_void_elements` (lowercase) directly. Ensure you use `from HtmlVoidElements import html_void_elements` for correct access.","severity":"gotcha","affected_versions":"0.1.0"},{"fix":"Filter the `html_void_elements` list to exclude deprecated or niche tags if your application targets a specific, modern HTML subset.","message":"The list includes both modern and 'ancient' HTML void tag names (e.g., 'basefont', 'bgsound') based on the comprehensive HTML living standard. If you require a list limited to only currently recommended or widely supported void elements, you may need to filter this list manually.","severity":"gotcha","affected_versions":"0.1.0"},{"fix":"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.","message":"In HTML5, a trailing slash in void elements (e.g., `<img />`) is entirely optional and is ignored by HTML parsers. Using it does not make the tag 'self-closing' in the XML sense within HTML. Misunderstanding this can lead to incorrect expectations about HTML parsing behavior or validation.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}