IT lexicon › Web › Haml

Haml

Web På svenska → Updated: 2026-08-01
More info
Type
Template language
Released
2006
Creator
Hampton Catlin
License
MIT

HTML without closing tags: indentation determines nesting, and %div.card is a complete element declaration.

Hampton Catlin wrote Haml in 2006, a year before doing the same thing to CSS and calling it Sass. The name stands for HTML Abstraction Markup Language. The premise is that closing tags are redundant information a machine can derive, and that badly nested HTML almost always comes from losing track of one.

The output is compact — often half the line count of the equivalent ERB — but brittle: one wrong indent moves an entire block, and nothing complains until the page renders. Haml caught on in the Rails world and has been ported to several languages. The criticism has always been the same: designers know HTML, not Haml, and pasting a code sample off the internet requires translating it first.

← Back to the lexicon