Keep in mind that I write literary fiction. It isn't something many people write and for good reason, it isn't all that popular.
More or less, though, there are writing skills that cross the genre. This is, of course, my take on how to write. The popular wisdom runs the gamut on dialogue tags from zero, nada, absolutely never to use what is needed.
It is one of the most annoying things I've found in reading is to lose track of who is saying what in a conversation. It annoys me so much that the second time I have to stop reading the story to count down and figure out who said a particular line, I toss the book in the trash bin. So here is my take.
One thing that should help is it is unlikely every character talks like every other character. That helps with keeping straight who is talking. For example, in High Tide, Shasta is a six year old who lived on the street with her homeless family. Now what are the odds that she is going to speak well? Slim. So Shasta throws in a double negative every once in a while, because that is how real kids talk. The nuns, on the other hand, generally speak in full sentences. Other's speech is determined by their ethnicity. And, if you've read my books, the Parade Lady really plays a trick on Kathryn with her Southern Rural Appalachian dialect. So number 1 on the list is make the characters speak like they would in real life according to how you have described them.
Another thing that can be done is to make the narrative surrounding the dialogue clear enough about the situation that it is clear what is happening and the conversation makes innate sense. Don't go overboard and make the narrative boring or the reader will never get past it to the dialogue.
And finally, the basics:
a) When the dialogue is a short conversation of 6 or 8 lines between two people, it is probably going to be easy enough to follow without dialogue tags;
b) When person 1 and person 2 take turns, it is easy to keep track in a short conversation that goes 1-2-1-2-1-2. But if someone speaks outside of that ping-pong style, if someone interrupts and takes two turns, like 1-2-1-2-2-1 then it might be necessary to tag the switch up. Certainly give that conversation a second or third going over to make sure it is clear to your reader;
c) When it is a two person conversation that is rather long, add a dialogue tag once in a while as a benchmark to make it easy for the reader to be certain who is speaking.
d) When there are more than two people in the conversation, then it is likely dialogue tags will be needed to make clear who is saying what - maybe not on every line. On occasion a third person can jump into a two person conversation, say a line and leave with it clear what happened. For example, and this isn't the world's greatest example, two people are on the street arguing or at least disagreeing about where they are going. When they hop into the taxi, person one says to the driver a destination and the cabby replies his one line in the whole scene, then person one continues to talk with person two.
Now the nuts and bolts of dialogue. In the USA we use double quote marks at the beginning and end of spoken words, with single quote marks for something quoted within a spoken text. In UK English, single quote marks are used where we use double quote marks.
In the US, commas and periods (full stops) are usually placed inside the ending quotation marks. Colons and semicolons are placed outside quotation marks. Question marks and exclamation marks are placed outside or inside the quote marks, depending on the sentence structure. (Look up that one, if it applies.) Just keep in mind to review American punctuation rules if you aren't an American writer, but plan to shop your ms to the American industry.
Keep tags simple. There is nothing wrong with saying 'said'. The best thing you can do for dialogue is read it aloud. If you say something different from what you wrote, what you said is probably better than what is in print. Swap it around.
Most publishing houses have their inhouse standards on dialogue tags. There is probably lots more on this on the Internet. There are probably plenty of writers who disagree, but this is my take on dialogue tags.
The main thing is that your writing is not work to read; not for agents/publishers or for your readers. You want your ms read clear through. You want your book published. You want readers to love your book so much that they tell others about it.