Dialogue (or dialog) tags tend to trip some writers. Add to the mix that the US tag standard differs from the UK, and it can add to the confusion.
CORRECT: “I don’t like spinach,” she said.
CORRECT: She said, “I don’t like spinach.”
INCORRECT: “I don’t like spinach.” she said.
INCORRECT: “I don’t like spinach.” She said.
INCORRECT: She said. “I don’t like spinach.”
Another problem, besides improperly punctuating the tags, is the tendency to tag with “unspeakables.”
“Don’t do that,” she slapped him.
“I like that,” she smiled.
Both of those are wrong. You cannot use an action that is not “spoken” as a tag. Smiled is the biggie and one that even I sometimes, if I’m cranking with a story, will forget and add in. Easy fix, though.
She slapped him. “Don’t do that!”
She smiled. “I like that.” (Or, alternatively: “I like that.” She smiled.)
Some publishers have house styles that will also chop certain things like breathed, sighed, moaned, or gasped as well. Some will allow them. Sometimes it depends on the editor you get.
Here’s the thing, one of the fastest ways to pick out a newbie writer is to find one whose characters rarely “said” or “asked” anything. They scream, chortle, yell, yodel, and choke every line. (You get the point.)
There is NOTHING WRONG with “said” and “asked” as dialog tags. Nothing. And you will get far more mileage out of your dialog by bracketing it with actions that put the dialog into crystal clear context. Or if it’s a dialog exchange by two characters, let them talk and let the reader put it into context. You don’t need to “block” action for the reader. They’ve got a good imagination, trust me. You don’t need to put a dialog tag on ever line either, especially if it’s just two characters talking and easy to keep up with them. An occasional tag will suffice and tidy up your writing.