tag can not be under , but inside a .
-- Try > htmlHelp ["html","body"] to get a list of allowed tags and attributes
-- Uncomment the following line to cause a type error.
-- _a [pcdata "Will not work!"],
_div [a_ [href_att "http://google.com"] [pcdata "Click Me!"]],
div_ [style_att "background-color:blue;"] [pcdata "Another Paragraph"],
_div [_img],
_div [_a [_img]],
_div content
]
]
-- Hello World table page with dynamic table multiplication table
-- Because children are specified as a list, we can use Haskell's built-in functions for
-- list manipulation and creation.
helloWorldTable n = helloWorldTemplate
[table_ [border_att "1"]
(map (\i->_tr
(map (\j->_td [pcdata (show (i * j))]) [1..n])
) [1..n])
]
-- childErrors will return a list of tag ordering errors at runtime.
-- Sorry, for usability we use lists for children and thus can't catch those errors at compile time.
errors = childErrors helloWorld