The Editor’s Manual
Free learning resource on English grammar, punctuation, usage, and style.
A question mark or exclamation point goes inside quotes when it is meant to punctuate the quoted text, but outside if it applies to the larger sentence.