“One morning I shot an elephant in my pajamas. How he got into my pajamas I’ll never know.”
Got your attention? Ever heard of this before? Simply, the dangling participle is a phrase that modifies the subject of the sentence, but that subject is in the wrong place and thus leaving the meaning uncertain.
Here is what the Oxford Dictionary has to say about it. I am posting their explanation in its entirety, with thanks, as it needs no further clarification:
Participles of verbs are often used to introduce subordinate clauses, which give extra information about the main part of a sentence (known as the main clause). It’s important to use participles in subordinate clauses correctly. The participle should always describe an action performed by the subject of the main part of the sentence. For example:
Mrs. Stevens, opening the door quietly, came into the room.
In this sentence, the present participle (opening) in the subordinate clause refers to the subject of the main clause. Mrs. Stevens is both opening the door and coming into the room.
Sometimes writers forget this rule and begin a sentence with a participle that doesn’t refer to the subject of their sentence. They then end up with what’s known as a dangling participle, as in this grammatically incorrect statement:
Travelling to Finland, the weather got colder and colder.
Strictly speaking, this sentence means that it is ‘the weather’ that is ‘travelling to Finland’, which obviously isn’t what the writer was intending to say. The sentence needs to be reworded to make the meaning clear and to make it grammatically correct, e.g.:
As I was travelling to Finland, the weather got colder and colder.
Travelling to Finland, I found that the weather got colder and colder.
Many of us are guilty of errors like this one when it comes to writing. Our thoughts are moving so quickly that we forget to stop and listen to how the words are being spoken. Don’t beat yourself up too much. It’s called learning, and we all can always do more of that.