blaze-0.0.1: Blaze-html-based HTML5 library

Safe HaskellNone

Blaze.Html5

Contents

Synopsis

Re-exports

module Text.Blaze

Attribute combinators

class Attributable h where

Used for applying attributes. You should not define your own instances of this class.

Methods

(!) :: h -> Attribute -> h

Apply an attribute to an element.

Example:

 img ! src "foo.png"

Result:

 <img src="foo.png" />

This can be used on nested elements as well.

Example:

 p ! style "float: right" $ "Hello!"

Result:

 <p style="float: right">Hello!</p>

(!.) :: Attributable h => h -> AttributeValue -> hSource

Class attribute.

(!#) :: Attributable h => h -> AttributeValue -> hSource

Id attribute.

Common operations

linesToHtml :: [Html] -> HtmlSource

Render the lines as HTML lines.

htmlIntercalate :: Html -> [Html] -> HtmlSource

Intercalate the given things.

htmlCommasAnd :: [Html] -> HtmlSource

Show some HTML comma-separated with “and” inbetween to be grammatical.

htmlCommas :: [Html] -> HtmlSource

Comma-separate some HTML.