Skip to content

Instantly share code, notes, and snippets.

@michaelschade
Created May 20, 2011 21:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaelschade/983815 to your computer and use it in GitHub Desktop.
Save michaelschade/983815 to your computer and use it in GitHub Desktop.
Skeleton html' and htmlBody functions
{- These imports will serve us for the remainder of the post -}
import Text.Blaze.Internal
import Text.Blaze.Html5
import Text.Blaze.Html5.Attributes
import qualified Data.ByteString.Char8 as C8
import qualified Data.Text as T
-- | HTML tag with no closing.
html' :: Html -> Html
html' = Parent "html" "<html" ""
-- | Special tag that opens only body but closes both body and html.
htmlBody :: Html -> Html
htmlBody = Parent "body" "<body" "</body></html>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment