In “Chapter 28: Prose, the Visual” of Pity the Reader: On Writing with Style, a note at the bottom of page 254 promises that on my website I will supply information on dialogue punctuation.
Dialogue Punctuation 101:
This is the goal: to let the reader know who is speaking.
These are the tools: quotation marks; speaker attributions; commas, periods or question marks; indenting and paragraphing.
These are the rules:
1) Use quotation marks at the beginning and end of each character’s speech. Think of them as embracing what’s spoken.
2) If there is a speaker attribution, use a comma or other punctuation to separate and distinguish it from the dialogue (i.e. “I want to take a walk,” she said.), even if that end punctuation is a question mark (“Want to take a walk?” he asked.)
3) Place the distinguishing punctuation inside the quotation mark. In other languages, such as German, the comma or question mark or whatever would go outside the quote (“I want to take a walk”, she said.), but in English, it goes within.
4) Do not separate a speaker attribution from the dialogue. Grammatically speaking, the dialogue and speaker attribution are inseparable, flesh of one flesh, one whole sentence. A speaker attribution by its lonesome is illegitimate. (Here’s how not to do it: “I want to take a walk.” She said.) This is a common mistake– and a telltale sign–of the amateur.
5) Indent and paragraph each time a speaker takes his or her turn. In other words, each time the speakers switch, indent and paragraph. The best dialogue is like a game of tennis. If you can eliminate speaker attributions, the dialogue is faster and sounds more like people talking. In that case, even more than if accompanied by speaker attributions, indenting and paragraphing each time you switch speakers shows visually who is speaking and enables the reader to keep track of who is who during a conversation.