Files
30-seconds-of-code/node_modules/html-void-elements/readme.md
2019-08-20 15:52:05 +02:00

87 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# html-void-elements
[![Build][build-badge]][build]
[![Downloads][downloads-badge]][downloads]
[![Size][size-badge]][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][]:
```bash
npm install html-void-elements
```
## Usage
```javascript
var htmlVoidElements = require('html-void-elements')
console.log(htmlVoidElements)
```
Yields:
```js
[ '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][license] © [Titus Wormer][author]
<!-- Definition -->
[build-badge]: https://img.shields.io/travis/wooorm/html-void-elements.svg
[build]: https://travis-ci.org/wooorm/html-void-elements
[downloads-badge]: https://img.shields.io/npm/dm/html-void-elements.svg
[downloads]: https://www.npmjs.com/package/html-void-elements
[size-badge]: https://img.shields.io/bundlephobia/minzip/html-void-elements.svg
[size]: https://bundlephobia.com/result?p=html-void-elements
[npm]: https://docs.npmjs.com/cli/install
[license]: license
[author]: https://wooorm.com