1. Computing

Using Haml with Sinatra

By

4 of 7

A Quick Haml Tutorial

HTML or XML attributes can be added using the curly brace syntax, or the parenthsis syntax. In the following example, both are demonstrated.

%p{:class => "paragraph"} This is a paragraph
%p(class="paragraph") This is another paragraph

Self-closing tags such as br or img can be done by adding a slash to the end of the tag.

%br/

©2014 About.com. All rights reserved.