So here are the general rules. (No, I don’t want to argue. Do this unless you are so big you can afford to break the rules). Trust me. It is the minimum expected from a professional. Doing anything else signals you don’t know what you’re doing.
GENERAL RULES OF FORMATTING DIALOGUE IN PROSE
For US, Use double quotes. For UK, single.
Single quotes go inside double quotes and inside punctuation within the double quotes (US).
Double quotes go inside single quotes and inside punctuation within single quotes (UK).
Speech tags belong after the first sentence or before the dialogue, always. Unless the dialogue is short (two sentences max).
EXAMPLE: “We gotta do this,” Adam said. “It’s not just the right thing, it’s the only choice.”
ALSO OK: “We gotta do this. We don’t have another choice,” Adam said.
Speech tags should always be simple and invisible. Said, asked, questioned, snapped, teased, joked, added, shouted, yelled, mused, stammered, replied, retorted, called, responded, and answered are common, but using fancier words like inserted, implied, etc. just breaks the third wall between author and readers and call attention to themselves. The reason simple tags work is they are invisible because readers are used to them. Getting fancy just pulls their attention off the story and onto you, the writer.
Bodily functions and actions cannot be speech tags. No coughed, laughed, smirked, etc. allowed. Practically, you can’t cough and talk at the same time. You can’t smirk or smile either. Same for most other such words.
Action tags often work just as well. Instead of saying “he said,” you write, dialogue followed by “(name) turned and ran for the door” or something similar. That identifies the speaker without using a tag.
EXAMPLE: “Look out!” Roger aimed the Glock and fired.
EXAMPLE: “Shit!” Indy ran as if his life depended on it, which seemed legit given the giant boulder thundering down toward him in his wake.
Related dialogue by the same character should be kept in the same paragraph. Unless there is a long speech. Long passages can be broken up by dropping the quote at the end of the paragraph and resuming in the next paragraph with a quote mark at the front. Put a quote mark at the end of the last paragraph of speech dialogue. Realistically, passages longer than two or three paragraphs should be broken up with internal monologues or action, or both, to avoid the pace coming to a halt or readers feeling lectured or bored.
Speech tags are separated from dialogue by a comma unless a question mark or exclamation point is required (rare rare rare, don’t overuse).
EXAMPLE: “Run”Indy said as he took Marion’s hand and raced across the field, dragging her behind him.
EXAMPLE:“Where are we going?” Marion demanded.
EXAMPLE:“Away from here,”Indy replied. “Assuming you want to live.”
And that’s it. That’s the conventions for formatting dialogue that have come into common use in Western literature and beyond. It’s what editors and readers expect to see, so using it shows you not only respect expectations but also conventions and are aiming to be professional. Presentation, after all, as any business school instructor or job hunt guru will tell you, does matter.
As always, I hope this is helpful. Feel free to share widely. In fact, please do. For what it’s worth…