Start with quotation marks, like this (double, not single, in American English):
“Ouch! My toe hurts.”
Punctuation in dialogue, including exclamation points, question marks, periods, commas, belongs inside the quotation marks, like this:
“Ouch! My toe hurts.”
It’s called a speech tag when a speaker is mentioned by name or by pronoun, like this:
“Ouch! My toe hurts,” Fred said.
“Ouch! My toe hurts,” he said.
Notice that the period becomes a comma after hurts, and the sentence ends after said with a period.
But the exclamation point doesn’t change:
“My toe hurts. Ouch!” Fred said.
“My toe hurts. Ouch!” he said.
Same with question marks:
“Your big toe or your pinky?” Sonya said.
“Your big toe or your pinky?” she said.
The speech tag can come first:
Fred said, “Ouch! My toe hurts.”
Or a speech tag can be in the middle of a speech:
“Something fell on me, too,” Sonya said, “when I stood in the graveyard.”
Or, when there are two sentences:
“I’m scared to go to the graveyard,” Fred said. “Everybody comes back maimed.”
An action can interrupt speech, too:
“I’m scared to go to the graveyard.” Fred pressed his hands together so hard the knuckles stood out. “Everybody comes back maimed.”
When a character quotes somebody, it looks like this, in American English:
“Sonya and Fred are wimps. They’re all like, ‘Ooh! The graveyard is haunted,’ and it isn’t,” the zombie said. “It’s just home.”
Notice that the quote within the quote starts and ends with single quotation marks: ‘
Laughing isn’t speech. This is correct (notice the punctuation):
Sonya laughed. “Some part of Fred always hurts!”
Not:
Sonya laughed, “Some part of Fred always hurts!”
If you aren’t sure as you’re writing, look at the dialogue in any novel you like, as long as it was published in the U.S. (Rules are different in the U.K.)
These are for clarity, which is the most important thing in writing, bar none:
Start a new paragraph whenever a different character speaks, even if neither says much:
“Where?” Jay asked.
“There,” Meredith said.
Start a new paragraph whenever somebody else does something or something happens during a dialogue passage:
“Something fell on me, too,” Sonya said, “when I stood in the graveyard.”
Fred rubbed his toe.
Sonya added, “It was after my great aunt’s funeral.”
A wolf or something worse howled in the distance.
“I’m never going there again,” Fred said. “Everybody comes back maimed.”
Below is from my book, Writing Magic. It’s on dialogue, too.
Said is a magical word. Boring, maybe, but magical nonetheless. It’s magical because it disappears. It becomes invisible. The reader finds out who’s talking and moves on.
What I’m about to tell you may differ from what your teachers have told you. Your teachers may want you to use lots of variants on said instead of said over and over. The reason is probably that they want you to vary your vocabulary and not use the same word repeatedly.
That’s often fine advice, but not when it comes to said in stories. Asked is as good as said if the line of dialogue is a question. Asked also disappears. And so does added, if it’s used when it makes sense and not used too much.
But you should almost never write,
“‘Where did you put the aardvark?’ she queried,”
or,
“‘Don’t you hate aardvarks?’ he questioned.”
Query and question call attention to themselves and away from your story. The reader saw the question mark and knows that the character is querying or questioning.
Same with exclaim. “Wow!” doesn’t need she exclaimed.
Avoid other noticeable words, like affirm, allege, articulate, assert, asseverate (a word I’d never heard of before I started writing this), aver, avow, claim, comment, confabulate, contend, declare, express, hint, mention, observe, opine, pronounce, profess, remark, utter, voice. I don’t mean that you shouldn’t ever use these perfectly fine words. I just mean, don’t use them as a substitute for said.
© Gail Carson Levine