You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a map of tag names to lists of allowed attributes.
Global attributes are stored at the special tag name *.
All attributes from HTML 4 and the current living HTML spec are included.
π Note: Includes deprecated attributes.
π Note: Attributes which were not global in HTML 4 but are in HTML, are
only included in the list of global attributes.
When should I use this?
You can use this to figure out if certain attributes are allowed on certain
HTML elements.
Install
This package is ESM only.
In Node.js (version 14.14+, 16.0+), install with npm:
This package exports the identifier htmlElementAttributes.
There is no default export.
htmlElementAttributes
Map of lowercase HTML elements to allowed attributes
(Record<string, Array<string>>).
Types
This package is fully typed with TypeScript.
It exports no additional types.
Compatibility
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.