Here are a few things to take note of when writing dialog tags.
Incorrect:
"That dog better stay out of our yard." Said the cat.
Correct:
"That dog better stay out of our yard," said the cat.
Sentences in dialog where you have the character's dialog tag should end in a comma, question mark, or exclamation point. Then the quotes. Then starting in lower-case, finish the thought.
Incorrect:
"He's a wimp. I can puff my tail and he'll whimper back to his mommy," said the other cat licking his shoulder.
Correct:
"He's a wimp. I can puff my tail and he'll whimper back to his mommy," said the other cat, licking his shoulder.
Put a comma after the tag if the character does something.
Incorrect:
"I'm scared of that dog," the third cat said, as she put her ears back.
Correct:
"I'm scared of that dog," the third cat said as she put her ears back.
If the action after the tag continues the character's thought with words like "as" or "and," there is no comma.