Punctuation within and around dialogue:
Dialogue has its own rules in regard to punctuation.
There are many different levels of dialogue, from simple and complex sentences, dialogue with attributions (letting the reader know who is saying what), interrupted dialogue or dialogue that trails off, to dialogue with attributions, actions, and narrative mixed in.
1. Simple dialogue:
A complete sentence of dialogue.
“I didn’t mean to hurt you.”
This is a single clause, with the speech and punctuation contained within the quotation marks.
This works as long as the reader knows who is saying it.
1a. Multiple and/or complex sentences within the one section of dialogue.
“I didn’t mean to hurt you, but things just got in the way. It’s life, y’know?”
This is a complex sentence made up of more than one clause. The example also follows on with another simple sentence, all within the quotation marks.
Again, it works if the reader knows who is talking.
2. Attributed dialogue:
Dialogue that is attributed to a character.
“I didn’t mean to hurt you,” she said.
“I didn’t mean to hurt you,” Gina said.
Again, a single clause, this time with a tag to let you know who is saying it. The tag can be a pronoun if it is already apparent who that pronoun is relating to.
The comma or other punctuation sits INSIDE the closing quotation marks.
The attribution isn’t capitalised (unless it’s a proper noun or ‘I’), as it is still part of the same sentence.
This rule still applies to questions or exclamations.
“Did you mean to hurt me?” he asked.
“No!” she said.
If the attribution comes before the dialogue, then the punctuation sits OUTSIDE the quotation marks EXCEPT AT THE END.
Gina said, “I didn’t mean to hurt you.”
He said, “Are you sure about that?”
You’ll notice the comma still separates the attribution and dialogue.
3. Interruptions or trailing off.
Cut off sentences.
Em-dash for interrupted sentences. NOT an en-dash or hyphen. An EM-DASH.
Ellipsis (three periods) for trailing off.
“It seems you meant to do—” he said.
“I didn’t, but…” she cut in.
4. Complex dialogue.
Dialogue with attributions, actions, and narrative thrown in all at once can be intimidating, but if you look at it logically, taking into account the rules above, it all makes sense.
“I didn’t mean to hurt you,” she said, stepping closer to him.
“Gina, it’s not what you meant that matters,” he said. “It’s the fact that you DID hurt—”
“NO!” Gina said. “I had no choice.” She reached for his cheek. “I love you,” she said, “and that’s what matters.”
If you look carefully at the conversation, you can see a mixture of all the rules, and you can see where full sentences are finished with correct punctuation, both within the dialogue, and in the narrative that is mixed in with it.
Remember, a new paragraph when the speaker changes.
There is more to it than this, but here are the basics.
More on complex dialogue another time.