Source code

Revision control

Copy as Markdown

Other Tools

<span id="start">Start</span>
<div>
<div id="host">
<span id="end">End</span>
</div>
</div>
<script>
window.getSelection().setBaseAndExtent(start.firstChild, 2, end.firstChild, 2);
</script>