{spaceless} renders its content first and then removes every run of whitespace
that stands between a > and a <, newlines included, and the
whitespace at both ends. <li>a</li> <li>b</li> becomes
<li>a</li><li>b</li>; the text inside an element keeps its
spaces.
That matters where whitespace shows: between inline-block elements a newline in
the template is a visible gap, and in a <pre> or a JSON-like attribute every
character counts. The template can stay indented for the reader while the output is compact.
For one tag at a time the ~ whitespace control does the same job without a
pair: {~items~} takes the whitespace on both sides of the tag, newlines included.
{tidy} goes the other way and indents the markup.
The tag only makes sense as a pair: written alone, the strict check reports that it never closes.