Order Force in HTML?

Published on February 19, 2025, filed under (RSS feed for all categories).

In English, adjectives need to follow a specific order. This requirement is known as “order force” (I couldn’t confirm this term, but the Guardian is using it), and the order, gullibly following a popular tweet, is opinion, size, age, shape, color, origin, material, and purpose. The force is strong: Use any other order, and the statement will sound weird or wrong.

What does order force have to do with HTML?

Going out on a limb, it feels a lot like we have a hidden order in HTML, too—not one of adjectives, but of attributes:

<img src alt>
<link rel href>
<a href class>
<!-- Just kidding on this one, but it’s a thing somewhere: -->
<div class name id src aria-disabled></div>

Any other order may also feel wrong—just like a sentence that uses an incorrect order of adjectives. (To stay with the tweet, <img alt src> may be our “green great dragons.”)

Sure, now, there is tooling—and yet that tooling doesn’t seem essential. In terms of popularity, it pales in comparison to other formatting-related tooling, as for CSS and JavaScript.

The fact that this tooling doesn’t seem as crucial, could be seen as a wink—I see as a wink—that, yes, there is something like order force, in HTML.

What do you think?

I don’t enable comments anymore on this site, but I’m listening and responding on Mastodon!

Was this useful or interesting? Share this post (e.g., on Mastodon or on Bluesky), and support my work by learning with my ebooks!

About Me

Jens Oliver Meiert, on November 9, 2024.

I’m Jens (long: Jens Oliver Meiert), and I’m a web developer, manager, and author. I’ve worked as a technical lead and engineering manager for small and large enterprises, I’m an occasional contributor to web standards (like HTML, CSS, WCAG), and I write and review books for O’Reilly and Frontend Dogma.

I love trying things, not only in web development and engineering management, but also in other areas like philosophy. Here on meiert.com I share some of my experiences and views. (I value you being critical, interpreting charitably, and giving feedback.)