<s>
Haml	B-Application
(	O
HTML	B-Language
Abstraction	O
Markup	O
Language	O
)	O
is	O
a	O
templating	O
system	O
that	O
is	O
designed	O
to	O
avoid	O
writing	O
inline	O
code	O
in	O
a	O
web	O
document	O
and	O
make	O
the	O
HTML	B-Language
cleaner	O
.	O
</s>
<s>
Haml	B-Application
gives	O
you	O
the	O
flexibility	O
to	O
have	O
some	O
dynamic	O
content	O
in	O
HTML	B-Language
.	O
</s>
<s>
Similar	O
to	O
other	O
template	O
systems	O
like	O
eRuby	B-Application
,	O
Haml	B-Application
also	O
embeds	O
some	O
code	O
that	O
gets	O
executed	O
during	O
runtime	O
and	O
generates	O
HTML	B-Language
code	I-Language
in	O
order	O
to	O
provide	O
some	O
dynamic	O
content	O
.	O
</s>
<s>
In	O
order	O
to	O
run	O
Haml	B-Application
code	O
,	O
files	O
need	O
to	O
have	O
a	O
extension	O
.	O
</s>
<s>
These	O
files	O
are	O
similar	O
to	O
.erb	B-Application
or	O
.eRuby	O
files	O
,	O
which	O
also	O
help	O
embed	O
Ruby	B-Language
code	O
while	O
developing	O
a	O
web	B-Application
application	I-Application
.	O
</s>
<s>
While	O
parsing	O
coding	O
comments	O
,	O
Haml	B-Application
uses	O
the	O
same	O
rules	O
as	O
Ruby	B-Language
1.9	O
or	O
later	O
.	O
</s>
<s>
Haml	B-Application
understands	O
only	O
ASCII-compatible	O
encodings	O
like	O
UTF-8	O
but	O
not	O
UTF-16	O
or	O
UTF-32	O
because	O
these	O
are	O
not	O
compatible	O
with	O
ASCII	B-Protocol
.	O
</s>
<s>
Haml	B-Application
can	O
be	O
used	O
at	O
the	O
command	B-Application
line	I-Application
,	O
as	O
a	O
separate	O
Ruby	B-Language
module	O
,	O
or	O
in	O
a	O
Ruby	B-Application
on	I-Application
Rails	I-Application
application	O
.	O
</s>
<s>
Haml	B-Application
was	O
originally	O
introduced	O
by	O
Hampton	O
Catlin	O
with	O
its	O
initial	O
release	O
in	O
2006	O
and	O
his	O
work	O
was	O
taken	O
up	O
by	O
a	O
few	O
other	O
people	O
.	O
</s>
<s>
His	O
motive	O
was	O
to	O
make	O
HTML	B-Language
simpler	O
,	O
cleaner	O
,	O
and	O
easier	O
to	O
use	O
.	O
</s>
<s>
Until	O
2012	O
,	O
Natalie	O
Weizenbaum	O
was	O
the	O
primary	O
maintainer	O
of	O
Haml	B-Application
,	O
followed	O
by	O
Norman	O
Clarke	O
until	O
2015	O
.	O
</s>
<s>
Natalie	O
worked	O
on	O
making	O
Haml	B-Application
usable	O
in	O
Ruby	B-Language
applications	O
,	O
while	O
the	O
branding	O
and	O
design	O
were	O
done	O
by	O
Nick	O
Walsh	O
.	O
</s>
<s>
Version	O
2.2.0	O
was	O
released	O
in	O
July	O
2009	O
with	O
support	O
for	O
Ruby	B-Language
1.9	O
and	O
Rails	B-Application
2.0	O
or	O
above	O
.	O
</s>
<s>
Version	O
3.0.0	O
was	O
released	O
in	O
May	O
2010	O
,	O
adding	O
support	O
for	O
Rails	B-Application
3	O
and	O
some	O
performance	O
improvements	O
.	O
</s>
<s>
The	O
fourth	O
major	O
version	O
broke	O
compatibility	O
with	O
previous	O
versions	O
,	O
only	O
supporting	O
Rails	B-Application
3	O
and	O
Ruby	B-Language
1.8.7	O
or	O
above	O
,	O
and	O
marked	O
the	O
switch	O
to	O
semantic	O
versioning	O
.	O
</s>
<s>
Several	O
amendments	O
like	O
increasing	O
the	O
performance	O
,	O
fixing	O
a	O
few	O
warnings	O
,	O
compatibility	O
with	O
latest	O
versions	O
of	O
Rails	B-Application
,	O
fixes	O
in	O
the	O
documentation	O
and	O
many	O
more	O
were	O
made	O
in	O
the	O
Haml	B-Application
4	O
series	O
.	O
</s>
<s>
It	O
supports	O
Ruby	B-Language
2.0.0	O
or	O
above	O
and	O
drops	O
compatibility	O
with	O
Rails	B-Application
3	O
.	O
</s>
<s>
A	O
'	O
trace	O
 '	O
option	O
,	O
which	O
helps	O
users	O
to	O
perform	O
tracing	O
on	O
Haml	B-Application
template	O
,	O
has	O
been	O
added	O
.	O
</s>
<s>
Four	O
principles	O
were	O
involved	O
in	O
development	O
of	O
Haml	B-Application
.	O
</s>
<s>
It	O
is	O
unclear	O
whether	O
Haml	B-Application
offers	O
any	O
differential	O
advantage	O
in	O
this	O
regard	O
.	O
</s>
<s>
Haml	B-Application
markup	O
is	O
similar	O
to	O
CSS	B-Language
in	O
syntax	O
.	O
</s>
<s>
For	O
example	O
,	O
Haml	B-Application
has	O
the	O
same	O
dot	O
.	O
</s>
<s>
representation	O
for	O
classes	O
as	O
CSS	B-Language
does	O
,	O
making	O
it	O
easy	O
for	O
developers	O
to	O
use	O
this	O
markup	O
.	O
</s>
<s>
The	O
following	O
are	O
equivalent	O
as	O
HAML	B-Application
recognises	O
CSS	B-Language
selectors	O
:	O
</s>
<s>
These	O
render	O
to	O
the	O
following	O
HTML	B-Language
code	I-Language
:	O
</s>
<s>
To	O
use	O
Haml	B-Application
with	O
Ruby	B-Language
,	O
the	O
Ruby	B-Language
Gemfile	B-Application
should	O
include	O
this	O
line	O
:	O
</s>
<s>
Similar	O
to	O
eRuby	B-Application
,	O
Haml	B-Application
also	O
can	O
access	O
local	O
variables	O
(	O
declared	O
within	O
same	O
file	O
in	O
Ruby	B-Language
code	O
)	O
.	O
</s>
<s>
This	O
example	O
uses	O
a	O
sample	O
Ruby	B-Language
controller	O
file	O
.	O
</s>
<s>
To	O
use	O
Haml	B-Application
independent	O
of	O
Rails	B-Application
and	O
,	O
install	O
haml	B-Application
gem	B-Application
,	O
include	O
it	O
in	O
Gemfile	B-Application
and	O
simply	O
import	O
[	O
Usage	O
:	O
require	O
'	O
haml' ]	O
it	O
in	O
Ruby	B-Language
script	O
or	O
invoke	O
Ruby	B-Language
interpreter	B-Application
with	O
-rubygems	O
flag	O
.	O
</s>
<s>
is	O
a	O
Haml	B-Application
class	O
.	O
</s>
<s>
Haml	B-Application
uses	O
whitespace	O
indentation	O
(	O
two	O
spaces	O
)	O
for	O
tag	O
nesting	O
and	O
scope	O
.	O
</s>
<s>
The	O
following	O
example	O
compares	O
the	O
syntaxes	O
of	O
Haml	B-Application
and	O
eRuby	B-Application
(	O
Embedded	B-Application
Ruby	I-Application
)	O
,	O
alongside	O
the	O
HTML	B-Language
output	O
.	O
</s>
<s>
eRuby	B-Application
syntax	O
looks	O
a	O
lot	O
like	O
HTML	B-Language
and	O
is	O
thereby	O
more	O
HTML-like	O
while	O
Haml	B-Application
is	O
more	O
CSS-like	O
.	O
</s>
<s>
In	O
Haml	B-Application
properties	O
like	O
class	O
,	O
id	O
can	O
be	O
represented	O
by	O
.	O
,	O
#	O
respectively	O
instead	O
of	O
regular	O
class	O
and	O
id	O
keywords	O
.	O
</s>
<s>
Haml	B-Application
also	O
uses	O
%	O
to	O
indicate	O
a	O
HTML	B-Language
element	O
instead	O
of	O
<>	O
as	O
in	O
eRuby	B-Application
.	O
</s>
<s>
The	O
above	O
Haml	B-Application
would	O
produce	O
this	O
XHTML	B-Language
:	O
</s>
<s>
The	O
official	O
implementation	O
of	O
Haml	B-Application
has	O
been	O
built	O
for	O
Ruby	B-Language
with	O
plugins	O
for	O
Ruby	B-Application
on	I-Application
Rails	I-Application
and	O
Merb	B-Application
,	O
but	O
the	O
Ruby	B-Language
implementation	O
also	O
functions	O
independently	O
.	O
</s>
<s>
Haml	B-Application
can	O
be	O
easily	O
used	O
along	O
with	O
other	O
languages	O
.	O
</s>
<s>
Below	O
is	O
a	O
list	O
of	O
languages	O
in	O
which	O
Haml	B-Application
has	O
implementations	O
:	O
</s>
<s>
Ruby	B-Language
:	O
</s>
