blaze-0.0.0: Common blaze operations

Safe HaskellNone

Blaze.Html5

Synopsis

Documentation

module Text.Blaze

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.

linesToHtml :: [Html] -> HtmlSource

Render the lines as HTML lines.