<h1>HTML document with examples of whitespace</h1>
<p>
This HTML document contains various types of whitespace, including HTML entities representing Unicode whitespace characters, as well as empty elements. It is intended to help test text selection. Some additional wrapping elements are present to exercise the application's ability to traverse and trim more complex selection ranges.
</p>
<p><em>Note:</em> Some information on Unicode whitespace characters and associated named entities can be found <ahref="https://en.wikipedia.org/wiki/Whitespace_character#Unicode">on the <i>Whitespace character</i> Wikipedia page</a>.</p>
<p>
In general, it should not be possible to annotate or highlight a selection that consists of only whitespace, and the annotated selection should not contain preceding or trailing whitespace.
</p>
<h2>Examples</h2>
<divid="toplevel">
<divid="apple">
<h3>Examples with differing amounts of leading and internal whitespace, and some nested inline elements</h3>
<pclass="testcase">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam fringilla ultrices lacus consequat pretium. <span>Curabitur posuere <i>posuere</i><span></span></span> rhoncus. <b>Maecenas</b> sit <span></span>amet velit<span></span> eget arcu aliquam pretium sed a tellus. Praesent sodales enim id justo bibendum condimentum sit amet sit amet lorem.
</p>
<pclass="testcase"
> h<span> i  </span>i
</p>
<pclass="testcase">
<span>Interdum et malesuada fames ac ante        ipsum primis in faucibus</span>
</p>
<divclass="testcase">
<p>
Interdum et malesuada fames ac ante ipsum primis in faucibus. Donec felis mauris, tristique aliquet dolor ac, facilisis dapibus metus. Morbi euismod congue erat, nec     luctus ligula dapibus ac. Integer fringilla aliquet tellus, ac sodales justo åsemper quis.
Preceded and followed by two paragraphs that contain only whitespace content. Interdum et malesuada fames ac ante ipsum primis in faucibus. Donec felis mauris, tristique aliquet dolor ac, facilisis dapibus metus. Morbi euismod congue erat, nec     luctus ligula dapibus ac. Integer fringilla aliquet tellus, ac sodales justo åsemper quis.
</p>
<p> </p>
<p> </p>
</div>
<divclass="testcase">
<p>
Separated by empty and whitespace-only elements. Interdum et malesuada fames ac ante ipsum primis in faucibus. Donec felis mauris, tristique aliquet dolor ac, facilisis dapibus metus. Morbi euismod congue erat, nec     luctus ligula dapibus ac. Integer fringilla aliquet tellus, ac sodales justo åsemper quis.
</p>
<p> </p>
<span>

</span>
<p>
Separated by empty and whitespace-only elements. Interdum et malesuada fames ac ante ipsum primis in faucibus. Donec felis mauris, tristique aliquet dolor ac, facilisis dapibus metus. Morbi euismod congue erat, nec     luctus ligula dapibus ac. Integer fringilla aliquet tellus, ac sodales justo åsemper quis.
</p>
</div>
</div>
</div>
<h3>Longer-form examples with various leading and internal whitespace</h3>
<divclass="testcase">
<divid="aplusb"> </div>
<divid="banana">
<span></span>
<p>
Phasellus vehicula augue eget maximus tristique. In in lectus volutpat,
eleifend lectus ac, interdum risus. Mauris nec accumsan dolor, rhoncus
tempor ligula. Nulla congue, lectus et accumsan placerat, massa ligula
molestie odio, mollis interdum lectus purus id turpis. Vestibulum ante
ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae;
Mauris tempus libero id ipsum iaculis, 

id maximus erat
varius. Nulla facilisis erat sit amet lacus placerat, ac lobortis sem
volutpat. In hac habitasse platea dictumst. Nulla ornare rutrum ipsum in
pulvinar. Praesent 

n 
 diam purus, bibendum eu ex a,
faucibus convallis sapien. Proin tempus finibus nisi eu aliquam.
</p>
</div>
<p> </p>
<p>
In id odio a velit dictum molestie. Fusce et congue metus, varius faucibus
eros. Suspendisse sagittis venenatis nunc nec dignissim. Curabitur
fringilla, leo eget vehicula bibendum, enim orci eleifend mauris, vitae
sagittis ante arcu vel neque.    Quisque varius semper
nisl, a auctor enim pellentesque sed. Aliquam a lorem lectus. Morbi
gravida tristique dignissim. Suspendisse placerat sollicitudin erat, eget
tristique ante eleifend quis.
</p>
<p>
Ut tempor, felis iaculis ultrices posuere, lectus quam
accumsan ante, id commodo est sem et neque. Duis sit amet massa ac quam
pretium ornare. Vivamus sed dui at felis consequat interdum nec sit amet
elit. Donec hendrerit neque congue ultrices ornare. Fusce libero eros,
consectetur id feugiat sit amet, eleifend vitae ante.   
   Sed a est placerat, fermentum justo eu, porttitor
nisl. In augue nunc, viverra eu varius id, interdum et libero. Vestibulum
congue accumsan sapien, sed sodales nunc vehicula quis. Etiam tincidunt
lacus nec sem ullamcorper, nec vulputate risus vulputate. Mauris fermentum
odio vitae diam lobortis sollicitudin. Nam sit amet congue urna, nec
varius urna.
</p>
<p>
Ut venenatis fringilla mauris, eget egestas neque sagittis id. Etiam
imperdiet eros quis placerat      suscipit.
Suspendisse sed ornare nunc. Duis finibus justo nec mi tempor mattis. Sed
pulvinar, dolor non bibendum tempor, dolor nunc vulputate massa, at
efficitur nulla enim id sapien. Integer imperdiet arcu vitae leo
ullamcorper commodo. Nunc at nisi ut arcu euismod venenatis quis in nisl.