#!/usr/bin/env ruby
# -*-mode: ruby; coding: utf-8;-*-

require 'cgi'

greet_cgi = CGI.new('html4')

def greet_cgi.put
 out('charset' => 'utf-8'){
   html('PRETTY' => '  '){
     [head{
        [title{'A title'}]},
      body{
        [i{'Hello'},
         ' ',
         b{'world!'}]
      }]}}
end

greet_cgi.put