The Wayback Machine - https://web.archive.org/web/20210610140257/https://github.com/wooorm/html-void-elements
Skip to content
main
Switch branches/tags
Code

Latest commit

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
Mar 26, 2021
Apr 14, 2018
Mar 26, 2021
Mar 26, 2021
Mar 26, 2021
Mar 26, 2021
Mar 26, 2021

html-void-elements

Build Coverage Downloads Size

List of known void HTML elements. Includes ancient (such as nextid and basefont) and modern (such as img and meta) tag names from the HTML living standard.

Install

This package is ESM only: Node 12+ is needed to use it and it must be imported instead of required.

npm:

npm install html-void-elements

Use

import {htmlVoidElements} from 'html-void-elements'

console.log(htmlVoidElements)

Yields:

[
  'area',
  'base',
  'basefont',
  'bgsound',
  'br',
  'col',
  'command',
  'embed',
  'frame',
  'hr',
  'image',
  'img',
  'input',
  'isindex',
  'keygen',
  'link',
  'menuitem',
  'meta',
  'nextid',
  'param',
  'source',
  'track',
  'wbr'
]

API

This package exports the following identifiers: htmlVoidElements. There is no default export.

htmlVoidElements

string[] — List of lowercase tag names.

License

MIT © Titus Wormer