All checks were successful
Publish To Prod / deploy_and_publish (push) Successful in 35s
88 lines
1.5 KiB
Markdown
88 lines
1.5 KiB
Markdown
# html-void-elements
|
||
|
||
[![Build][build-badge]][build]
|
||
[![Downloads][downloads-badge]][downloads]
|
||
[![Size][size-badge]][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.
|
||
|
||
**Note**: there’s one special case: `menuitem`.
|
||
W3C specifies it to be void, but WHATWG doesn’t.
|
||
I suggest using the void form.
|
||
|
||
## Install
|
||
|
||
[npm][]:
|
||
|
||
```sh
|
||
npm install html-void-elements
|
||
```
|
||
|
||
## Use
|
||
|
||
```js
|
||
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
|