Quick Take

import { strict as assert } from "assert";
import { allHtmlAttribs } from "html-all-known-attributes";

assert.equal(allHtmlAttribs.has("href"), true);

assert.equal(allHtmlAttribs.size, 702);

// iterating:
const gathered = [];
for (const x of allHtmlAttribs) {
  // push first three
  if (gathered.length < 3) {
assert.deepEqual(gathered, [


This package aims to have the most excessive list of all legit attribute names that can be put into HTML. Currently we have a list of 702 attribute names.

This includes deprecated attributes, Microsoft-proprietary-ones that email templates use (like mso-line-height-rule) and other-ones you've probably never seen before.



This package exports a plain object with a single key, allHtmlAttribs. Its value is a Set opens in a new tab of 702 strings — all HTML attribute names known to the Humanity.


See it in the monorepo opens in a new tab, on GitHub.


To report bugs or request features or assistance, raise an issue on GitHub opens in a new tab.

Any code contributions welcome! All Pull Requests will be dealt promptly.


MIT opens in a new tab

Copyright © 2010–2021 Roy Revelt and other contributors

Related packages:

📦 html-crush 5.0.1
Minifies HTML/CSS: valid or broken, pure or mixed with other languages
📦 html-img-alt 3.0.1
Adds missing alt attributes to img tags. Non-parsing
📦 html-entities-not-email-friendly 0.6.1
All HTML entities which are not email template friendly
📦 html-table-patcher 5.0.1
Visual helper to place templating code around table tags into correct places