The 9 HTML Elements That Have an Attribute of the Same Name, or: The 9 Attributes That Have an Element of the Same Name

Published on November 20, 2023, filed under (RSS feed for all categories).

There are nine HTML elements that have an attribute of the same name:

  1. abbr—and abbr attribute
  2. cite—and cite attribute
  3. data—and data attribute
  4. form—and form attribute
  5. label—and label attribute
  6. slot—and slot attribute
  7. span—and span attribute
  8. style—and style attribute
  9. title—and title attribute

(Nine! Before I dug into this, I would have bet there were fewer such pairings.)

That’s it—though if you’re into HTML factoids like this one, well, that makes us two! I ask about and share things like this in my little HTML quiz series on Mastodon—a series I’m turning into an HTML course. If you’re interested, follow along or get notified!

Was this useful or interesting? Share (toot) this post, or maybe treat me to a coffee. Thanks!

About Me

Jens Oliver Meiert, on September 30, 2021.

I’m Jens, and I’m an engineering lead and author. I’ve worked as a technical lead for companies like Google and as an engineering manager for companies like Miro, I’m close to W3C and WHATWG, and I write and review books for O’Reilly and Frontend Dogma.

With my current move to Spain, I’m open to a new remote frontend leadership position. Feel free to review and refer my CV or LinkedIn profile.

I love trying things, not only in web development, but also in other areas like philosophy. Here on meiert.com I share some of my views and experiences.