[![Build status](https://badge.buildkite.com/b273e163ad43e370175962ba47620374b4a27e4e1d83553208.svg)](https://buildkite.com/allsopp/p6-html-boredom) # HTML::BoreDOM Write HTML with Perl 6: > use HTML::BoreDOM; > put > h("html", > h("body", > h("h1", "Hello, World!"), > h("p", "Lorem ipsum...")));

Hello, World!

Lorem ipsum...

The `h()` subroutine is imported automatically and returns an object (that stringifies to escaped HTML): > h("span", "foo"); HTML::BoreDOM::Element.new(tag => "span", attrs => ${}, children => $["foo"]) > ~h("span", "foo"); foo HTML attributes are optionally declared using named arguments: > ~h("a", :href, :target<_blank>, "Click Here!") Click Here! Looping is easy: > my @items = ; > ~h("ul", > @items.map({ h("li", $_) })); Templates are just functions: > sub foo ($title, $subtitle, $content) { > ~ h("h1", $title) > ~ h("h2", $subtitle) > ~ h("p", $content) > } > foo("My Website", "Using templates", "Lorem ipsum ...");

My Website

Using templates

Lorem ipsum ...

## Miscellaneous Inline `