Adding punctuation marks to dialogue can be a tricky and confusing business if you're not well practiced at it. Knowing how to punctuate your dialogue is key to getting the emotional and narrative results in your writing that you want and communicating clearly with your reader. A few key steps can help you punctuate dialogue effectively.
Separate dialogue from tag lines (he said, she said) with a comma. Without the comma your dialogue can become confusing to write and to read. Likewise, set a tag line off with commas if it interrupts a sentence or line of dialogue. The tag line serves as an interjection in this case and commas help separate it.
Place periods and commas inside quotation marks. However, remember that question marks, dashes and exclamation points reside outside the quotations unless they refer specifically to the words being spoken by your characters.
Use single quotation marks when you write a quote within a quote, otherwise known as an embedded quote. For example: "Have you read 'A Rose for Emily' already?" he asked her.
Emphasize the interior dialogue you write by putting it into italics. This helps set it off from the rest of your dialogue. Be sure to use it consistently lest it become confusing.
Insert quotation marks at the end of dialogue if it runs over into more than one paragraph. While holding off on the closing quotation marks might seem awkward or wrong, it is the grammatically correct way to punctuate dialogue.