In the United States, commas and periods always precede closing quotation marks of quoted material. Colons and semicolons always follow closing quotation marks of quoted material. Question marks always follow closing quotation marks unless the question mark belongs to the material being quoted, in which case the question mark precedes the closing quotation marks.

In British style, the punctuations can go before or after quotes based on preference.

I hope this helps!