Closed dg closed 10 years ago
In README.md is stated:
Hiccup is intelligent enough to render different HTML elements in different ways, in order to accommodate browser quirks: user=> (html [:p]) "<p />"
But <p /> in not valid HTML code.
<p />
In old HTML 4: backslash is not valid at all (it is so-called NET syntax http://en.wikipedia.org/wiki/Standard_Generalized_Markup_Language#NET and no HTML browser recognizes it).
In new HTML 5: a "/" character may be present only if the element is a void (see http://www.w3.org/TR/html-markup/syntax.html#syntax-elements) and p is non-void element.
p
In XHTML 1.0: there is a HTML Compatibility Guidelines (http://www.w3.org/TR/xhtml1/#C_3), which says:
Given an empty instance of an element whose content model is not EMPTY (for example, an empty title or paragraph) do not use the minimized form (e.g. use <p> </p> and not <p />).
Fixed in #91.
In README.md is stated:
But
<p />
in not valid HTML code.In old HTML 4: backslash is not valid at all (it is so-called NET syntax http://en.wikipedia.org/wiki/Standard_Generalized_Markup_Language#NET and no HTML browser recognizes it).
In new HTML 5: a "/" character may be present only if the element is a void (see http://www.w3.org/TR/html-markup/syntax.html#syntax-elements) and
p
is non-void element.In XHTML 1.0: there is a HTML Compatibility Guidelines (http://www.w3.org/TR/xhtml1/#C_3), which says: