createRange

The Document.createRange() method returns a new Range object whose start and end are offset 0 of the Document object on which it was called.

MDN Reference