I’m amazed how often authors don’t know the proper way to punctuate dialog. Even if you weren’t taught how to do this in school, you should have figured it out by reading novels that were properly edited.
Okay, here’s the scoop. Dialog is punctuated differently than a normal sentence. Rather than a period, use a comma, followed by “he said”, “she said”, etc. A question uses a question mark (?) and if the speaker is noted, it should say “he asked” or “she asked” or questioned or queried or even wondered, not “said”. A sentence that is an exclamation is punctuated with an exclamation mark (!).
In all cases, the “he” preceding “said” or “asked” doesn’t need to be capitalized. For example, “I’m going to the library,” he said. Or “Are you going to the library?” he asked.
I hope that I have insulted the intelligence of most of you with this 4th grade grammar lesson who already know this. But I am amazed by how often I see it done incorrectly by otherwise very talented authors. Being creative is really not in your favor in this area.