• Skip to main content
  • Skip to search
  • Skip to select language
    • Technologies Overview
    • HTML
    • CSS
    • JavaScript
    • Graphics
    • HTTP
    • APIs
    • Browser Extensions
    • MathML
    • Learn web development
    • Tutorials
    • References
    • Developer Guides
    • Accessibility
    • Game development
    • ...more docs
    • Send Feedback
    • Contribute to MDN
    • Report a content issue 🌐
    • Report a platform issue 🌐
  1. Web technology for developers
  2. Web APIs
  3. StaticRange
  4. StaticRange.collapsed

Table of contents

  • Value
  • Specifications
  • Browser compatibility

StaticRange.collapsed

The collapsed read-only property of the StaticRange interface returns true if the range's start position and end position are the same.

Value

A boolean value which is true if the range is collapsed. A collapsed range is one in which the start and end positions are the same, resulting in a zero-character-long range..

Specifications

Specification
DOM Standard
# ref-for-dom-range-collapsedā‘ 

Browser compatibility

BCD tables only load in the browser

Found a problem with this page?

  • Edit on GitHub
  • Source on GitHub
  • Report a problem with this content on GitHub
  • Want to fix the problem yourself? See our Contribution guide.

Last modified: Apr 2, 2022, by MDN contributors

Related Topics

  1. StaticRange
  2. Constructor
    1. StaticRange()
  3. Properties
    1. collapsed
    2. endContainer
    3. endOffset
    4. startContainer
    5. startOffset
  4. Inheritance:
    1. AbstractRange
  • Web Technologies
  • Learn Web Development
  • About MDN
  • Feedback
  • About
  • MDN Web Docs Store
  • Contact Us
  • Firefox

MDN

  • MDN on Twitter
  • MDN on Github

Mozilla

  • Mozilla on Twitter
  • Mozilla on Instagram

Ā© 2005-2022 Mozilla and individual contributors. Content is available under these licenses.

  • Terms
  • Privacy
  • Cookies