O'Reilly logo

Pragmatic Guide to Sass by Michael Lintorn Catlin, Hampton Catlin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Haml Walkthrough: HTML

We’re not going to go through the HTML to Haml conversion in as much detail as the previous ERB one. We just want to see how the stylistic changes can also be applied to a static site.

haml/haml_h1.html
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
 
Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/
 
xhtml1-transitional.dtd">
 
<html​ xmlns=​"http://www.w3.org/1999/xhtml"
 
xml:lang=​"en"​​>
 
<head>
 
<meta​ http-equiv=​"Content-Type"​ content=​"text/html;
 
charset=UTF-8"​ ​/>
 
<title>​​<%= @title || “Awesome Site” %>​​</title>
 
</head>
 
<body>
 
<div​ id=​'wrapper'​​>
 
<div​ id=​'header'​​>
 
<h1>​Awesome Site​</h1>
 
</div>
 
<div​ id=​'content'​​>
 
<%= yield %>
 
</div>
 
<div​ id=​ ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required