You probably know what dialogue is. Even if you've never thought about it in fancy, official terms like "dialogue in writing is the representation of speech between two or more speakers", and have always thought of it more like "people talking", you more or less have the gist of it. Sometimes authors can pull off a story that forgoes dialogue, but those are in the firm minority. The fact that dialogue is such a widely used device means there are a few rules to it, most of which are easy. However, this fact has never stopped people like you or I from royally messing them up.
So, how does it work?
There are four basic aspects to dialogue:
1. Each new speaker gets a new line.
"So," continued Ford Prefect, "if you would just like to come over here and lie down..."
"What?" said Mr Prosser.
"Ah, I'm sorry," said Ford, "perhaps I hadn't made myself fully clear. Somebody's got to lie in front of the bulldozers, haven't they? Or there won't be anything to stop them driving into Mr Dent's house, will there?"
"What?" said Mr Prosser again.
Even though this is a conversation between only two people, every time the speaker is new or switches, they get a new line all to themselves.
2. There are quotations around the actual speech.
You may notice that in the original publication of Hitch Hiker's Guide single quotes are used around the speech, but here I have shamelessly converted them to double quotes. This is because I am Canadian and have bad habits. In Canada and America double quotes are the standard around speech, and in England single quotes are standard. These are the only countries that exist. Neither are incorrect, but it's good to pick one and stick to it.
3. Punctuation.
Punctuation happens in and outside of quotations, more or less the same as it would if they weren't there. There are a few rules around punctuation where the two meet.
"So," continued Ford Prefect, "if you would just like to come over here and lie down..."
Commas punctuate tags. The first comma is attached to the "so" and is inside the quotations. The second comma is attached to the tag and is outside them. Here the tag interrupts the speech at a pause where a comma would have been, but this is also how you punctuate a tag that interrupts speech where a full stop would be.
"Ah, I'm sorry," said Ford, "perhaps I hadn't made myself fully clear...
Here the "Ah, I'm sorry" could be it's own thought. It's tempting to put a period there, but that's wrong. Always use a comma!
Except in a situation like this: "What?" said Mr Prosser.
What's a rule without an exception? Here there's different punctuation going on. The question mark stands in for the comma, because we need to know that "What?" is a question. Doing something like "What?," seems ridiculous, so we forgo the comma.
4. Tags.
What is a tag, anyway? A tag is a marker of who is speaking. "said Mr Prosser" is a tag. "Continued Ford Prefect" is also a tag. Tags can be an indicator of how something is being said, or just there to keep track of who is speaking. The fancier the tag, the more likely it is your reader will notice it, which is something you should have in the back of your mind when you write them. Do you want to outright say how someone is speaking, or do you want the speech to indicate that on its own? Usually, strong dialogue doesn't need wordy or flashy tags, just the occasional marker so the reader can keep track of who is speaking. Sometimes you can even forget them.
How do you create strong dialogue?
The difference is in the words. Try this:
"Are you sure you know what you're doing?" said Trillian, peering nervously into the darkness, "We've been attacked once already, you know."
"Look kid, I promise you the live population of this planet is nil plus the four of us, so come one, lets get on in there. Er, hey, Earthman..."
"Arthur," said Arthur.
"Yeah, could you just sort of keep this robot with you and guard this end of the passageway? Okay?"
"Guard?" said Arthur, "What from? You just said there was no one here."
"Yeah, well, just for safety, okay?" said Zaphod.
"Whose? Yours or mine?"
"Good lad. Okay, here we go."
There are four three characters in that conversation: Zaphod, Arthur, Trillian and Marvin. Knowing that, you can probably figure out who is speaking, even if the speech is untagged. Why is that? All of them are speaking, but their speech is all different. It's in what they say as well as how they say it. Zaphod calls Arthur "Earthman", and Arthur corrects him. When Arthur is annoyed, he speaks differently than when Zaphod or Trillian is. Marvin is always annoyed, but again his speech is easy to pick out without tags, which is how you can tell he's not actually speaking here.
The words each character uses to express themselves are different. That's one of the keys of unique dialogue. You need to get behind your character and understand how they would express themselves. Everyone thinks to use different words, and everyone puts them together differently. Everything can mediate how a person speaks in real life, and this applies to your characters as well. Where they grew up, how much formal education they have had, what kind of people they associate with, all can determine how they speak, but there are no sure markers.
Writing in a thick accent is usually a bad idea. It makes the dialogue inaccessible and when it's not done perfectly cheapens the piece it's in. Accents are more complicated than just the superficial sound of them; what makes them is in the syntax, the colloquialisms and the little details of speech. You can usually get an accent across without resorting to phonetics, and your piece will be better off for it.
One of the reasons dialogue can start sounding the same between characters is that in the context of a story, it is more than just the characters speaking. Dialogue gets stuff done. It effects the pace of a scene and can be a fast and easy way to communicate important information to your readers. Dialogue can help set tone and is a huge deal for characterization. It's integral, really. When it needs to do all that stuff though, sometimes the voices of the characters get lost. That's one of the distinctions between workable and good dialogue. Good dialogue checks all the boxes.
A Note about Dialogue in Poetry
Poetry often uses dialogue as well as prose, however, there are no rules in poetry there isn't a clear standard for how this is done. People have pulled off straight up, grammatically correct dialogue, while others have used systems just off of that. Others have forgone anything but contextual indication. It's really up to the author how they want to communicate speech inside their poetry. Content-wise, dialogue in poetry works the same as prose; it develops speakers, changes pace and communicates action, it just doesn't have to be in any specific format. A good guideline for this is within any piece is sticking to one format of dialogue. This helps readers understand what is an is not speech in your piece, because however you choose to do it, it's the same all the way through.
Some things to think about when you write Dialogue
Try asking yourself some of these questions (and more, if you think you need them!) when you're going over your dialogue:
- What emotions are being conveyed by each speaker?
- How can you make their words reflect that?
- Is information being revealed in a way that is characteristic of the speaker?
- What information is being revealed to both other characters and the reader?
Hopefully these will get you thinking and on your way to writing awesome dialogue!