6
6
[ ![ Size] [ size-badge ]] [ size ]
7
7
8
8
List of HTML void tag names.
9
- Includes ancient (such as ` nextid ` and ` basefont ` ) and modern (such as ` img ` and
10
- ` meta ` ) tag names from the HTML living standard.
11
9
12
- ## Install
10
+ ## Contents
11
+
12
+ * [ What is this?] ( #what-is-this )
13
+ * [ When should I use this?] ( #when-should-i-use-this )
14
+ * [ Install] ( #install )
15
+ * [ Use] ( #use )
16
+ * [ API] ( #api )
17
+ * [ ` htmlVoidElements ` ] ( #htmlvoidelements )
18
+ * [ Types] ( #types )
19
+ * [ Compatibility] ( #compatibility )
20
+ * [ Security] ( #security )
21
+ * [ Related] ( #related )
22
+ * [ Contribute] ( #contribute )
23
+ * [ License] ( #license )
24
+
25
+ ## What is this?
26
+
27
+ This is a list of all void tag names according to HTML.
13
28
14
- This package is ESM only: Node 12+ is needed to use it and it must be ` import ` ed
15
- instead of ` require ` d.
29
+ > 👉 ** Note** : Includes ancient (such as ` nextid ` and ` basefont ` ) tag names too.
30
+
31
+ ## When should I use this?
32
+
33
+ You can use this when you’re writing HTML parsers, minifiers, or compilers.
34
+
35
+ ## Install
16
36
17
- [ npm] [ ] :
37
+ This package is [ ESM only] [ esm ] .
38
+ In Node.js (version 12.20+, 14.14+, or 16.0+), install with [ npm] [ ] :
18
39
19
40
``` sh
20
41
npm install html-void-elements
21
42
```
22
43
44
+ In Deno with [ Skypack] [ ] :
45
+
46
+ ``` js
47
+ import {htmlVoidElements } from ' https://cdn.skypack.dev/html-void-elements@2?dts'
48
+ ```
49
+
50
+ In browsers with [ Skypack] [ ] :
51
+
52
+ ``` html
53
+ <script type =" module" >
54
+ import {htmlVoidElements } from ' https://cdn.skypack.dev/html-void-elements@2?min'
55
+ </script >
56
+ ```
57
+
23
58
## Use
24
59
25
60
``` js
@@ -65,7 +100,33 @@ There is no default export.
65
100
66
101
### ` htmlVoidElements `
67
102
68
- ` string[] ` — List of lowercase tag names.
103
+ List of HTML void tag names (` Array<string> ` ).
104
+
105
+ ## Types
106
+
107
+ This package is fully typed with [ TypeScript] [ ] .
108
+
109
+ ## Compatibility
110
+
111
+ This package is at least compatible with all maintained versions of Node.js.
112
+ As of now, that is Node.js 12.20+, 14.14+, and 16.0+.
113
+ It also works in Deno and modern browsers.
114
+
115
+ ## Security
116
+
117
+ This package is safe.
118
+
119
+ ## Related
120
+
121
+ * [ ` wooorm/html-tag-names ` ] ( https://github.com/wooorm/html-tag-names )
122
+ — list of HTML tag names
123
+ * [ ` wooorm/html-element-attributes ` ] ( https://github.com/wooorm/html-element-attributes )
124
+ — map of HTML elements to attributes
125
+
126
+ ## Contribute
127
+
128
+ Yes please!
129
+ See [ How to Contribute to Open Source] [ contribute ] .
69
130
70
131
## License
71
132
@@ -91,6 +152,14 @@ There is no default export.
91
152
92
153
[ npm ] : https://docs.npmjs.com/cli/install
93
154
155
+ [ skypack ] : https://www.skypack.dev
156
+
94
157
[ license ] : license
95
158
96
159
[ author ] : https://wooorm.com
160
+
161
+ [ esm ] : https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
162
+
163
+ [ typescript ] : https://www.typescriptlang.org
164
+
165
+ [ contribute ] : https://opensource.guide/how-to-contribute/
0 commit comments