Files
coopgo/node_modules/html-void-elements/readme.md
sgauthier 6e64e138e2
All checks were successful
Publish To Prod / deploy_and_publish (push) Successful in 35s
planning
2024-10-14 09:15:30 +02:00

88 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 (such as `nextid` and `basefont`) and modern (such as `img` and
`meta`) tag names from the HTML living standard.
**Note**: theres one special case: `menuitem`.
W3C specifies it to be void, but WHATWG doesnt.
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