Back

html (clj)

(source)

macro

(html options & content)
Render Clojure data structures to a compiled representation of HTML. To turn the representation into a string, use clojure.core/str. Strings inside the macro are automatically HTML-escaped. To insert a string without it being escaped, use the [[raw]] function. A literal option map may be specified as the first argument. It accepts two keys that control how the HTML is outputted: `:mode` : One of `:html`, `:xhtml`, `:xml` or `:sgml` (defaults to `:xhtml`). Controls how tags are rendered. `:escape-strings?` : True if strings should be escaped (defaults to true).

Examples