files/en-us/web/api/range/index.md
{{APIRef("DOM")}}
The Range interface represents a fragment of a document that can contain nodes and parts of text nodes.
A range can be created by using the {{ domxref("Document.createRange()") }} method. Range objects can also be retrieved by using the {{ domxref("Selection/getRangeAt", "getRangeAt()") }} method of the {{ domxref("Selection") }} object or the {{domxref("Document/caretRangeFromPoint", "caretRangeFromPoint()")}} method of the {{domxref("Document")}} object.
There also is the {{domxref("Range.Range()", "Range()")}} constructor available.
{{InheritanceDiagram}}
Range object with the global {{domxref("Document")}} as its start and end.Also inherits properties from its parent interface, {{domxref("AbstractRange")}}.
startContainer and endContainer nodes.There are no inherited methods.
Range to one of its boundary points.Range with another Range.Range.Range.Range object with boundary points identical to the cloned Range.Range from the {{ domxref("Document") }}.Range from the document tree into a {{ domxref("DocumentFragment") }}.Range; this would be the union of all the rectangles returned by {{ domxref("range.getClientRects()") }}.Range.boolean indicating whether the given point is in the Range.Range.boolean indicating whether the given node intersects the Range.Range to contain the {{ domxref("Node") }} and its contents.Range to contain the contents of a {{ domxref("Node") }}.Range.Range.Range relative to another {{ domxref("Node") }}.Range relative to another {{ domxref("Node") }}.Range relative to another {{ domxref("Node") }}.Range relative to another {{ domxref("Node") }}.Range into a new {{ domxref("Node") }}.Range.{{Specifications}}
{{Compat}}