html tags
v4.0.0
標準HTML標籤列表
它只是幾個可以在任何環境中使用的JSON文件。
它有意遺漏了過時的標籤。
npm install html-tags
import htmlTags from 'html-tags' ;
console . log ( htmlTags ) ;
//=> ['a', 'abbr', 'acronym', …]
和void(自閉)標籤:
import { voidHtmlTags } from 'html-tags' ;
console . log ( voidHtmlTags ) ;
//=> ['area', 'base', 'br', …]
更改HTML元素時,請確保在index.d.ts
中更新類型。