1. Technology
Send to a Friend via Email
You can opt-out at any time. Please refer to our privacy policy for contact information.

Using Haml with Sinatra


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
  This is a title
%div{:id => "header"}
  This is the page header
  This is the page header

©2014 About.com. All rights reserved.