0,0.5);
    }
    p::target-text {
        color: blue;
        text-shadow: 0.25em 0.25em rgba(0,0,128,0.5);
    }
</style>
<p>partially selected target</p>
<script>
    window.location.hash = "#:~:text=target";
    const target = document.querySelector("p");
    selectRangeWith(range => {
        range.selectNodeContents(target);
        range.setStart(target.childNodes[0], 4);
        range.setEnd(target.childNodes[0], 21);
    });
</script>
