1. Computing

Using Haml with Sinatra

By

5 of 7

A Quick Haml Tutorial

There's a special syntax for making div tags with class or id attributes. The following shows both the normal form and the shorthand form.

%div{:class => "title"}
  This is a title
.title
  This is a title
 
%div{:id => "header"}
  This is the page header
#header
  This is the page header

©2014 About.com. All rights reserved.