List of known HTML tag names
npm install html-tag-names[![Build][build-badge]][build]
[![Coverage][coverage-badge]][coverage]
[![Downloads][downloads-badge]][downloads]
[![Size][size-badge]][size]
List of known HTML tag names.
* What is this?
* When should I use this?
* Install
* Use
* API
* htmlTagNames
* Types
* Compatibility
* Security
* Related
* Contribute
* License
This is a list of HTML tag names.
It includes ancient (for example, nextid and basefont) and modern (for
example, shadow and template) names from the HTML living standard.
The repo includes scripts to regenerate the data from the specs.
You can use this package when you need to know what tag names are allowed in
any version of HTML.
This package is [ESM only][esm].
In Node.js (version 14.14+, 16.0+), install with [npm][]:
``sh`
npm install html-tag-names
In Deno with [esm.sh][esmsh]:
`js`
import {htmlTagNames} from 'https://esm.sh/html-tag-names@2'
In browsers with [esm.sh][esmsh]:
`html`
`js
import {htmlTagNames} from 'html-tag-names'
console.log(htmlTagNames.length) // => 148
console.log(htmlTagNames.slice(0, 20))
`
Yields:
`js`
[
'a',
'abbr',
'acronym',
'address',
'applet',
'area',
'article',
'aside',
'audio',
'b',
'base',
'basefont',
'bdi',
'bdo',
'bgsound',
'big',
'blink',
'blockquote',
'body',
'br'
]
This package exports the identifier htmlTagNames.
There is no default export.
List of known (lowercase) HTML tag names (Array).
This package is fully typed with [TypeScript][].
It exports no additional types.
This package is at least compatible with all maintained versions of Node.js.
As of now, that is Node.js 14.14+ and 16.0+.
It also works in Deno and modern browsers.
This package is safe.
* wooorm/mathml-tag-names
— list of MathML tag names
* wooorm/svg-tag-names
— list of SVG tag names
* jgierer12/react-tag-names
— list of React’s HTML and SVG tag names
* wooorm/svg-element-attributes
— map of SVG elements to attributes
* wooorm/html-element-attributes
— map of HTML elements to attributes
* wooorm/aria-attributes`
— list of ARIA attributes
Yes please!
See [How to Contribute to Open Source][contribute].
[MIT][license] © [Titus Wormer][author]
[build-badge]: https://github.com/wooorm/html-tag-names/workflows/main/badge.svg
[build]: https://github.com/wooorm/html-tag-names/actions
[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/html-tag-names.svg
[coverage]: https://codecov.io/github/wooorm/html-tag-names
[downloads-badge]: https://img.shields.io/npm/dm/html-tag-names.svg
[downloads]: https://www.npmjs.com/package/html-tag-names
[size-badge]: https://img.shields.io/bundlephobia/minzip/html-tag-names.svg
[size]: https://bundlephobia.com/result?p=html-tag-names
[npm]: https://docs.npmjs.com/cli/install
[esmsh]: https://esm.sh
[license]: license
[author]: https://wooorm.com
[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
[typescript]: https://www.typescriptlang.org
[contribute]: https://opensource.guide/how-to-contribute/