Files
30-seconds-of-code/node_modules/html-void-elements

html-void-elements

Build Downloads Size

List of known void HTML elements. Includes ancient (for example, nextid and basefont) and modern (for example, img and meta) tag-names from both W3C and WHATWG.

Note: theres one special case: menuitem. W3C specifies it to be void, but WHATWG doesnt. I suggest using the void form.

Installation

npm:

npm install html-void-elements

Usage

var htmlVoidElements = require('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

htmlVoidElements

Array.<string> — List of lower-case tag-names.

License

MIT © Titus Wormer