This page is Almost Ready

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

content fragments

Summary

A contiguous range of content, which may stretch arbitrarily across DOM nodes.

A range (or fragment) is a contiguous stretch of content within a document, one that may traverse DOM nodes arbitrarily. For example, a user may select a stretch of text that starts in the middle of one paragraph, and ends in the middle of another. CSS styling may apply dynamically to the ::first-line or ::first-letter of text. Or a flow of text may thread through a series of region elements, each of which may display only a portion of a paragraph that spills over from adjacent regions within the chain.

You can use the DOM Range API to programatically access such arbitrary stretches of content.

See also

Related articles

Regions