A dangling modifier (a specific case of which is the dangling participle) is an ambiguous grammatical construct, whereby a grammatical modifier could be misinterpreted as being associated with a word other than the one intended, or with no particular word at all. For example, a writer may have meant to modify the subject, but word order makes the modifier seem to modify an object instead. Such ambiguities can lead to unintentional humor or difficulty in understanding a sentence in formal contexts.
A typical example of a dangling modifier is illustrated in Turning the corner, a handsome school building appeared. The modifying clause Turning the corner is clearly supposed to describe the behaviour of the narrator (or other observer), but grammatically it appears to apply to nothing in particular, or to the school building. Similarly, in At the age of eight, my family finally bought a dog, the modifier At the age of eight "dangles", not attaching to the subject of the main clause (and possibly implying that the family was eight years old when it bought the dog, rather than the intended meaning of giving the narrator's age at the time).
Dangling participle clauses
As an adjunct, a participle clause is normally at the beginning or the end of a sentence, and usually attached to the subject of the main clause, as in "Walking down the street (clause), the man (subject) saw the beautiful trees (object)." However, when the subject is missing or the clause attaches itself to another object in a sentence, the clause is seemingly "hanging" on nothing or on an entirely inappropriate noun. It thus "dangles", as in these sentences:
Walking down Main Street, the trees were beautiful.
Reaching the station, the sun came out.
In the first sentence, the adjunct clause may at first appear to modify "the trees", the subject of the sentence. However, it actually modifies the speaker of the sentence, who is not explicitly mentioned.
In the second sentence, the adjunct may at first appear to modify "the sun", the subject of the sentence. Presumably, there is another, human subject that did reach the station and observed the sun coming out, but since this subject is not mentioned in the text, the intended meaning is obscured, and therefore this kind of sentence is incorrect in standard English.
Strunk and White's The Elements of Style provides another kind of example, a misplaced modifier (another participle):
I saw the trailer peeking through the window.
Presumably, this means the speaker was peeking through the window, but the placement of the clause "peeking through the window" makes it sound as though the trailer were doing so. The sentence can be recast as, "Peeking through the window, I saw the trailer."
Similarly, in "She left the room fuming", it is possibly the room, rather than "she", that was fuming. It may be preferable to write "Fuming, she left the room", to avoid any ambiguity.
Strunk and White describe as "ludicrous" another of their examples: "Being in a dilapidated condition, I was able to buy the house very cheap." The author obviously meant the house was dilapidated. But (in the opinion of Strunk and White) what he wrote was that he (the speaker or writer, identified as "I") was dilapidated.
Bernstein offers another ludicrous example: "Roaring down the track at seventy miles an hour, the stalled car was smashed by the train." 
The adjunct is meant to modify "train": it is the train that is roaring down the track. But the subject of the main clause is "the stalled car". The writer is suggesting that the stalled car, which really isn't moving at all, is roaring down the track. The sentence could be rewritten more felicitously: "Roaring down the track at seventy miles an hour, the train smashed the stalled car." Or: "The stalled car was smashed by the train, roaring down the track at seventy miles an hour."
Follett provides yet another ludicrous example: "Leaping to the saddle, his horse bolted." 
But who leaped? Presumably the horseman – certainly not the horse, which was wearing the saddle. In this example, the noun or pronoun intended to be modified isn't even in the sentence. Unproblematic: "Leaping to the saddle, he made his horse bolt forward", or "As he leaped into the saddle, his horse bolted." (In the latter, the non-finite adjunct clause is replaced by a finite subordinate clause.)
These examples illustrate a writing principle that dangling participles violate. Follett states the principle: "A participle at the head of a sentence automatically affixes itself to the subject of the following verb – in effect a requirement that the writer either make his [grammatical] subject consistent with the participle or discard the participle for some other construction."  Strunk and White put it this way: "A participle phrase at the beginning of a sentence must refer to the grammatical subject." 
Dangling participles should not be confused with clauses in absolute constructions, which are considered grammatical. Because the participle phrase in an absolute construction is not semantically attached to any single element in the sentence, it is easily confused with a dangling participle. The difference is that a participle phrase is intended to modify a particular noun or pronoun, but is instead erroneously attached to a different noun, whereas as an absolute clause is not intended to modify any noun at all. An example of an absolute construction is:
The weather being beautiful, we plan to go to the beach today.
Non-participial modifiers that dangle can also be troublesome:
After years of being lost under a pile of dust, Walter P. Stanley, III, left, found all the old records of the Bangor Lions Club.
The above sentence, from a newspaper article, suggests that it is the subject of the sentence, Walter Stanley, who was buried under a pile of dust, and not the records. It is the prepositional phrase "after years of being lost under a pile of dust" which dangles. This example has been cited in at least one usage manual[vague] as an example of the kind of ambiguity that can result from a dangling modifier.
One morning I shot an elephant in my pajamas. How he got into my pajamas I'll never know. – Groucho Marx
Though under the most plausible interpretation of the first sentence, Captain Spaulding would have been wearing the pajamas, the line plays on the grammatical possibility that the elephant was instead.
Strunk and White offer this example: "As a mother of five, and with another on the way, my ironing board is always up."  Is the ironing board (grammatical subject) really the mother of five? Less ambiguous: "As the mother of five, and with another on the way, I always keep my ironing board up."[dubious ] Or: "My ironing board is always up, because I am the mother of five, with another on the way."
Modifiers reflecting the mood or attitude of the speaker
Participial modifiers can sometimes be intended to describe the attitude or mood of the speaker, even when the speaker is not part of the sentence. Some such modifiers are standard and are not considered dangling modifiers: "Speaking of [topic]", and "Trusting that this will put things into perspective", for example, are commonly used to transition from one topic to a related one or for adding a conclusion to a speech.
Usage of "hopefully"
Since about the 1960s, controversy has arisen over the proper usage of the adverb hopefully. Some grammarians[who?] object to constructions such as "Hopefully, the sun will be shining tomorrow." Their complaint is that the term "hopefully" dangles, and can be understood to describe either the speaker's state of mind or the manner in which the sun will shine. It no longer modifies just a verb, an adjective or another adverb, but instead modifies the whole sentence to convey the attitude of the speaker.
"Hopefully" used in this way is a disjunct (cf. "admittedly", "mercifully", "oddly"), and is reminiscent of the German "hoffentlich", which similarly means "it is to be hoped that . . . ." Disjuncts (also called sentence adverbs) are useful in colloquial speech[dubious ] for the concision they permit.
No other word in English expresses that thought. In a single word we can say it is regrettable that (regrettably) or it is fortunate that (fortunately) or it is lucky that (luckily), and it would be comforting if there were such a word as hopably or, as suggested by Follett, hopingly, but there isn't. [...] In this instance nothing is to be lost – the word would not be destroyed in its primary meaning – and a useful, nay necessary term is to be gained.
What had been expressed in lengthy adverbial constructions, such as "it is regrettable that ..." or "it is fortunate that ...", had of course always been shortened to the adverbs "regrettably" or "fortunately". Bill Bryson says, "those writers who scrupulously avoid 'hopefully' in such constructions do not hesitate to use at least a dozen other words – 'apparently', 'presumably', 'happily', 'sadly', 'mercifully', 'thankfully', and so on – in precisely the same way." What has changed, however, in the controversy[dubious ] over "hopefully" being used for "he was hoping that ..." or "she was full of hope that ..." is that the original clause was transferred from the speaker, as a kind of shorthand to the subject itself, as though "it" had expressed the hope. ("Hopefully, the sun will be shining.") Although this still expressed the speaker's hope "that the sun will be shining", it may have caused a certain disorientation as to who was expressing what when it first appeared. As time passes, this controversy[dubious ] may fade as the usage becomes increasingly accepted, especially since adverbs such as "mercifully", "gratefully", and "thankfully" are similarly used.
Merriam-Webster gives a usage note on its entry for "hopefully"; the editors point out that the disjunct sense of the word dates to the early 18th century and has been in widespread use since at least the 1930s. Objection to this sense of the word, they state, only became widespread in the 1960s. The editors maintain that this usage is "entirely standard".
Yet the choice of "regrettably" above as a counterexample points out an additional problem. At the time that objection to "hopefully" became publicized, grammar books[vague] relentlessly pointed out the distinction between "regrettably" and "regretfully". The latter is not to be used as a sentence adverb, they state; it must refer to the subject of the sentence. The misuse of "regretfully" produces worse undesired results than "hopefully", possibly contributing to disdain for the latter. The counterpart hopably was never added to the language.
- On the face of it, he showed his mettle in the boxing ring.
- Turning blue, the chicken was lodged in his mouth.
- After hitting the accelerator, the light changed from yellow to red.
- Like most dogs, Mitt Romney says his dog Seamus liked fresh air.
- McArthur, Tom, ed. The Oxford Companion to the English Language, pp. 752-753. Oxford University Press, 1992, ISBN 0-19-214183-X The dangling modifier or participle
- Merriam Webster's dictionary of English Usage p. 315, Merriam-Webster, 1995
- The Least You Should Know about English p. 134, Wilson and Glazier, Cengage Learning, 2008
- Theodore M. Bernstein, The Careful Writer: A Modern Guide to English Usage (New York: Atheneum, 1985), 128.
- Wilson Follett, Modern American Usage: A Guide (New York: Hill and Wang, 1966), 117.
- Strunk and White, 13.
- The American Heritage Book of English Usage: A Practical and Authoritative Guide to Contemporary English. Houghton Mifflin Harcourt. 1996. p. 1. ISBN 0-395-76785-7.
- Bangor Daily News 20 Jan 1978. Reprinted with discussion in Merriam-Webster's Dictionary of English Usage p. 315.
- Brainy Quote, 2009, web: BQuote-62.
- Strunk and White, 14.
- Kahn, John Ellison and Robert Ilson, Eds. The Right Word at the Right Time: A Guide to the English Language and How to Use It, pp. 27–29. London: The Reader's Digest Association Limited, 1985. ISBN 0-276-38439-3.
- Bernstein, Theodore M. Miss Thistlebottom's Hobgoblins, p. 51. The Noonday Press, New York, 1971. ISBN 0-374-52315-0.
- Bryson's Dictionary of Troublesome Words, Bill Bryson, p. 99, Broadway Books, New York, 2002, ISBN 0-7679-1043-5
- "hopefully." Merriam-Webster Online Dictionary. 2007. http://www.m-w.com/cgi-bin/dictionary?va=hopefully (15 Aug. 2007).
- Jeanne Moos, Mitt Romney 'dog-on-the-roof' story appears in Newt Gingrich ad http://www.ksdk.com/news/article/296683/28/Romney-dog-on-the-roof-story-appears-in-Gingrich-ad