Punctuation that is part of dialogue, is always within the quotation marks. General American style is to put the comma and the period inside the quotation marks, whether or not they are part of dialogue. Also, American style uses the double quotation marks as the primary and the single mark as the secondary, while traditional British style reverses that.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.