Before you write your first piece of dialogue you should understand what tags are and why they are used. Basically, a tag added to a piece of dialogue should make it clear to the reader who is speaking. Sometimes a tag isn’t even necessary. If it is clear who is speaking, then don’t clutter up the writing by adding a tag.
Another key thing about dialogue tags is that they shouldn’t be intrusive, they shouldn’t pull the reader away from the story. If “he said” or “she said” will be enough, use that. The word “said” disappears to a reader. Yet by adding a name or “he” or “she,” the speaker can easily be clarified.
Study how dialogue is written in the books you read and analyze the tags. Why were they used in a certain situation? Were they necessary? Were the correct grammar rules followed? Did the tags draw you away from what was said or the storyline? Did they seem excessive or silly? Also, remember that just because a well-known author got away with using a poor or excessive dialogue tag doesn’t mean that you will. You want to present to your agent, editor, and readers your very best work.
My article on Using Dialogue Tags has been added to the Writing Tools on my website and to the Writing Tips on this blog.