Mar 26, 2021 Fragments, like you just read, are simply pieces of files that aren't placed next to each other on the drive. That might be kind of strange to think about, and nothing you would ever notice, but it's true. For example, when you create a new Microsoft Word file, you see the whole file in one place, like on the Desktop or in your Documents folder. Every fragment includes a subset of the fields that belong to its associated type. In the above example, the Person type must declare firstName and lastName fields for the NameParts fragment to be valid. We can now include the NameParts fragment in any number of queries and mutations that refer to Person objects, like so. Sentence Fragment Examples and Their Corrections A sentence fragment is a group of words that resembles a sentence. It will start with a capital letter and have ending punctuation; however, it is neither an independent clause nor a complete idea. Definition of fragment (Entry 1 of 2): a part broken off, detached, or incomplete The dish lay in fragments on the floor. Some common synonyms of fragment are division, member, part, piece, portion, section, and segment. While all these words mean 'something less than the whole,' fragment applies to a part produced by or as if by breaking off. Only a fragment of the play still exists When.
Every complete sentence must have, at a minimum, a subject and a verb. The sentence must also express a complete thought. If a sentence is lacking one or more of these three essential components, it is a sentence fragment. Below, you'll find a few tips and tricks on effectively correcting sentence fragments.
Components of a Sentence
Fragment Sentence
Every sentence must have at least three components to be considered a complete sentence:
- The sentence must express a complete thought; we need to know what it's about.
- The sentence must have a subject: a person or thing that the sentence is about. This is usually a noun, a noun phrase, or a pronoun.
- The sentence must express an action. This is usually a verb.
For several examples of what a complete thought should look like, check out these Examples of Complete Sentences.
Sentences can also contain:
- Objects: These are the recipients of the action of the verb.
- Adjectives: These words modify nouns.
- Adverbs: These words modify verbs, adjectives or other adverbs.
- Phrases or dependent clauses: These are words that provide additional information to the reader.
Let's look at a sentence example that includes each of these components:
Esperanza hurriedly ran her little dog to the park.
You can see how these different parts come together to form a complete sentence.
- Esperanza = subject
- hurriedly = adverb
- ran = verb
- her = pronoun
- little = adjective
- dog = object
- to the park = dependent clause
Defining a Sentence Fragment
There are many ways to fix a sentence fragment. But, let's start with what, exactly, a sentence fragment is:
- It doesn't express a complete thought.
For example: For example, milk and eggs.
This sentence is lacking a complete thought - what are the milk and eggs an example of?
- It's lacking a subject.
For example: Eating chicken.
This sentence is lacking a subject - who or what is eating chicken?
- It's doesn't express an action.
For example: A book without a cover.
What about a book without a cover? Is the book doing something? Is someone doing something to the book? We don't know, because there is no subject.
- It's a dependent clause, standing alone.
For example: Because I went to the store.
The conjunction 'because' makes this clause dependent. A dependent clause can't stand alone, it needs to be attached to an independent clause
How to Correct Sentence Fragments
Knowing how to correct a sentence fragment depends on what's lacking. Here are three ways to make sentence fragment corrections:
- Add a subject or verb to complete the thought.
Sentence Fragment: Enjoying his latest self-development book.
Complete Sentence: Roland was enjoying his latest self-development book. Join the dependent clause with an independent clause to complete the thought.
Sentence Fragment: Because her puppy got sick.
Complete Sentence: Kelly was late for work because her puppy got sick.In this example, you can also remove the subordinating word to complete the thought. Either a period or semicolon would work in the corrected thought.
Sentence Fragment: Kelly was late. Because her puppy got sick.
Complete Thought: Kelly was late. Her puppy got sick.- Rewrite the portion with the fragment.
Sentence Fragment: He ran through the door. Clenching his water bottle. When he reached the crib, he saw that the baby was okay.
Complete Sentence: He ran through the door. His hands clenched his water bottle. When he reached the crib, he saw that the baby was okay.
For more, check out these Sentence Fragment Examples. There, you'll find a list of fragments, followed by their proper revisions.
Write Right Today!
In a hurried world filled with emails and texts, it can be easy to landslide into sentence fragments. But, save the fragments for a fun text with your gal pal. When writing for school or work, keep a keen eye on your potential for fragments.
To help you stay in tip-top shape, check out Definition of Academic Writing. In it, we discuss the primary characteristics of academic writing, as well as the best way to structure this form. Likewise, for professional contexts, Types of Business Communication Writing will help you format your work properly and keep your emails in tip-top shape.
The DocumentFragment
interface represents a minimal document object that has no parent. It is used as a lightweight version of Document
that stores a segment of a document structure comprised of nodes just like a standard document. The key difference is due to the fact that the document fragment isn't part of the active document tree structure. Changes made to the fragment don't affect the document (even on reflow) or incur any performance impact when changes are made.
Constructor
DocumentFragment()
- Creates and returns a new
DocumentFragment
object.
Properties
This interface has no specific properties, but inherits those of its parent, Node
, and implements those of the ParentNode
interface.
DocumentFragment.childElementCount
Read only- Returns the amount of child
elements
theDocumentFragment
has. DocumentFragment.children
Read only- Returns a live
HTMLCollection
containing all objects of typeElement
that are children of theDocumentFragment
object. DocumentFragment.firstElementChild
Read only- Returns the
Element
that is the first child of theDocumentFragment
object, ornull
if there is none. DocumentFragment.lastElementChild
Read only- Returns the
Element
that is the last child of theDocumentFragment
object, ornull
if there is none.
Methods
This interface inherits the methods of its parent, Node
, and implements those of the ParentNode
interface.
DocumentFragment.append()
- Inserts a set of
Node
objects orDOMString
objects after the last child of the document fragment. DocumentFragment.prepend()
- Inserts a set of
Node
objects orDOMString
objects before the first child of the document fragment. DocumentFragment.querySelector()
- Returns the first
Element
node within theDocumentFragment
, in document order, that matches the specified selectors. DocumentFragment.querySelectorAll()
- Returns a
NodeList
of all theElement
nodes within theDocumentFragment
that match the specified selectors. DocumentFragment.getElementById()
- Returns the first
Element
node within theDocumentFragment
, in document order, that matches the specified ID. Functionally equivalent toDocument.getElementById()
.
Usage notes
A common use for DocumentFragment
is to create one, assemble a DOM subtree within it, then append or insert the fragment into the DOM using Node
interface methods such as appendChild()
or insertBefore()
. Doing this moves the fragment's nodes into the DOM, leaving behind an empty DocumentFragment
. Because all of the nodes are inserted into the document at once, only one reflow and render is triggered instead of potentially one for each node inserted if they were inserted separately.
Fragment Definition
This interface is also of great use with Web components: <template>
elements contain a DocumentFragment
in their HTMLTemplateElement.content
property.
An empty DocumentFragment
can be created using the document.createDocumentFragment()
method or the constructor.
Example
HTML
JavaScript
Result
Specifications
Specification | Status | Comment |
---|---|---|
DOM The definition of 'DocumentFragment' in that specification. | Living Standard | Added the constructor and the implementation of ParentNode . |
Selectors API Level 1 The definition of 'DocumentFragment' in that specification. | Obsolete | Added the querySelector() and querySelectorAll() methods. |
Document Object Model (DOM) Level 3 Core Specification The definition of 'DocumentFragment' in that specification. | Obsolete | No change from Document Object Model (DOM) Level 2 Core Specification |
Document Object Model (DOM) Level 2 Core Specification The definition of 'DocumentFragment' in that specification. | Obsolete | No change from Document Object Model (DOM) Level 1 Specification |
Document Object Model (DOM) Level 1 Specification The definition of 'DocumentFragment' in that specification. | Obsolete | Initial definition |
Browser compatibility
BCD tables only load in the browser

See also
