Order Force in HTML?
Published on FebĀ 19, 2025 (updated AprĀ 6, 2025), filed under development, html (feed). (Share this on Mastodon orĀ Bluesky?)
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!
About Me
Iām Jens (long: Jens Oliver Meiert), and Iām a web developer, manager, and author. Iāve been working as a technical lead and engineering manager for companies youāve never heard of and companies you use every day, 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.)