Htmless - Fast extensible html5 builder in pure Ruby

Htmless is actually not a new gem. It was renamed from a gem named hammer_builder.

Quick syntax example do
  html do
    head { title 'my_page' }
    body do
      div.content! do
        p.centered "my page's content"


<!DOCTYPE html>
<html xmlns="">
    <div id="content">
      <p class="centered">my page's content</p>

What's new

There is not much new, only the name and that it's no longer dependent on ActiveSupport. This is a maintenance release.

For those unfamiliar with the gem

Main features of Htmless are:

  • It's as fast as template-engines (erb) and much faster then other Ruby HTML builders.
  • You can use inheritance (impossible with templates) and other properties of Ruby.
  • You can write html in pure Ruby.

Do you wish to know more?