PLDB
Languages Features Calendar CSV Lists Blog About Sponsor Add Language
GitHub icon

HAML

HAML

HAML, aka HTML Abstraction Markup Language, is a template created in 2006 by Hampton Catlin.

#147on PLDB 16Years Old 6.3kUsers
2Books 0Papers 323Repos

Try now: Web

Haml (HTML Abstraction Markup Language) is a templating system that is designed to avoid writing inline code in a web document and make the HTML easy and clean. Haml gives the flexibility to have some dynamic content in HTML. Similar to other web languages like PHP, ASP, JSP and template systems like eRuby, Haml also embeds some code that gets executed during runtime and generates HTML code in order to provide some dynamic content. Read more on Wikipedia...


Example from the web:
%section.container %h1= post.title %h2= post.subtitle .content = post.content
Example from hello-world:
%html %title Hello World %body %h1 Hello World
Example from Linguist:
%p Hello, World!
Example from Wikipedia:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'> <head> <title>BoBlog</title> <meta content='text/html; charset=utf-8' http-equiv='Content-Type' /> <link href="/stylesheets/main.css" media="screen" rel="Stylesheet" type="text/css" /> </head> <body> <div id='header'> <h1>BoBlog</h1> <h2>Bob's Blog</h2> </div> <div id='content'> <div class='entry'> <h3 class='title'>Halloween</h3> <p class='date'>Tuesday, October 31, 2006</p> <p class='body'> Happy Halloween, glorious readers! I'm going to a party this evening... I'm very excited. </p> </div> <div class='entry'> <h3 class='title'>New Rails Templating Engine</h3> <p class='date'>Friday, August 11, 2006</p> <p class='body'> There's a very cool new Templating Engine out for Ruby on Rails. It's called Haml. </p> </div> </div> <div id='footer'> <p> All content copyright © Bob </p> </div> </body> </html>

Language features

Feature Supported Example Token
Comments
-# A comment
Line Comments
-# A comment
-#
Semantic Indentation
Disk Output ϴ

Books about HAML on goodreads

title author year reviews ratings rating
HTML: Hypertext Markup Language, Cascading Style Sheets, Dynamic HTML, Extensible Hypertext Markup Language, Html5, Haml, Webfarbe Books LLC 2010 0 2 5.00

Books about HAML from ISBNdb

title authors year publisher
Instant Haml Krzysztof Niksinskiis 2013-09-25 Packt Publishing
brainfuck.html · haml.html · game.html

View source

PLDB - Build the next great programming language · v2022 · Day 31 · Docs · Build · Acknowledgements · Traffic Today · Traffic Trends · Mirrors · GitHub · feedback@pldb.com