As per Rob's and Dave's comments earlier, the head section could be extracted from here and included in .erb file. Actually this is something from http://sinatra-book.gittr.com/
 
"Another default convention of Sinatra, is the layout, which automatically looks for a views/layout template file to render before loading any other views. In the case of using erb, your `views/layout.erb` would look something like this:
```ruby
<html>
  <head>..</head>
  <body>
    <%= yield %>
  </body>
</html>
```