Speech tags or dialogue tags are the little bits of prose between lines of dialogue that tell the reader who’s talking, and perhaps also something about the way they talk or what they’re doing.

“We know that,” they said, in perfect unison. “The question is how often you should use them!”
In the example above, the part I’ve underlined is the speech tag. Thanks to the tag, we know there are multiple people speaking at the same time. If we were watching a film or TV show, we wouldn’t need to be told about this strange hive mind because we’d be able to see and hear them.
But in writing, the reader sometimes needs that little extra bit of information to help them see exactly what you want them to. The problem is that adding that information at the end of every single line of dialogue quickly becomes exhausting.
“So what should we do about it?” they asked.
“I’m getting round to that,” she replied.
“Well, maybe get there quicker,” they said.
“But this is helping me illustrate my point!” she replied.
“Whatever,” they said.
It sounds repetitive, the tags break up the flow of the words, and they’re just not necessary. In a conversation between two people it’s obvious that when one person finishes speaking, and someone else speaks up, it must be the other person, right?
“So we just shouldn’t include any?”
“You tell me.”
“No, you tell us. You’re the editor.”
“Am I? I thought you were.”
“Oh. Maybe. I’ve lost track.”
“Exactly.”
For a couple of lines in a conversation between two people, this works great. But for longer conversations and those with more participants, the dialogue becomes almost like a puzzle the reader has to solve to find out what’s going on. And if the reader is focussed on trying to figure out who’s speaking, they’re not going to be immersed in the world you’ve created.
You need to find a balance that gives the reader the information they need without becoming dull.
The bad news is that there’s no hard and fast rule about what the right balance is. It depends on the dialogue itself and what else is happening in the scene. The good news is that a speech tag at the end of a line of spoken dialogue is not the only way you can tell the reader what is happening. There are a variety of ways you can do it without having to repeat yourself:
Use speech tags in different positions in the dialogue
Your character’s words might have more impact if the speech tag breaks in halfway through the line of dialogue, creating a natural dramatic pause and allowing their line to finish on their words, rather than the speech tag–related admin around them:
“I knew it,” he said. “You have been stealing my food from the fridge!”
Or even before the line of dialogue:
He turned around slowly to face me and said, “It’s over.”
There will be more variety in your sentence constructions, which will help keep the reader engaged.
Use an action tag instead
An action tag, like a speech tag, slots in around the lines of spoken dialogue. But instead of just describing how the person speaks, it can also describes something they do. Since you use a new paragraph for each speaker, an action tag in the same paragraph as a line of dialogue works just as well to tell the reader who’s speaking.
“Wait for me!” Lily jogged to catch up with the others. “Why do you all walk so bloody fast?”
Use context
It might be obvious from the situation who would be saying which line. If one of your characters is bubbly and excitable, and the other is a giant grump, you might not need to tell your readers which one of them is really looking forward to Christmas and which one isn’t.
“The presents. The food. The pretty lights! I can’t wait. Can we put up the tree already?”
“I hope you’re joking.”
“It’s almost December already!”
“Yeah, almost December.”
Use a character’s name in the dialogue itself
I would tend to reserve this for situations where there are more than two people talking. How often in real life do you use your partner’s or a friend’s name when you’re talking just to them? It sounds a little odd and unnatural.
In written dialogue between a group of people where a question or comment is addressed to one person in particular by name, we as readers can generally safely assume that person will be the one responding to it – unless we’re told otherwise.
“Thank you all for coming. How was your week, John?”
“It was great, thanks!”
Writing is an art, not a science. That means there’s no formula anyone can give you that tells you the perfect number and position of speech tags for your work. There’s always going to be an element of what feels, looks, or sounds “right”.
But by using a variety of these techniques to ensure that your reader can follow a conversation without getting bored or having to try too hard, you’ll be on the right track.