After a word group introducing a quotation, the context will determine whether a colon, a comma, or no punctuation is appropriate.
Formal introduction
Use a colon after a formal introduction—a full independent clause, not just an expression such as he said or she remarked.
Expression such as he said
If a quotation is introduced with an expression such as he said or she remarked—or if it is followed by such an expression—use a comma.
Blended quotation
When a quotation is blended into your own sentence, either a comma or no punctuation is appropriate, depending on the way the quotation fits into your sentence structure.
Quoted material at the beginning of a sentence
If a quotation appears at the beginning of a sentence, set it off with a comma unless the quotation ends with a question mark or an exclamation point.
Quoted material interrupted by commentary
If a quoted sentence is interrupted by explanatory words, use commas to set off the explanatory words.
If two successive quoted sentences from the same source are interrupted by explanatory words, use a comma before the explanatory words and a period after them.
Exercises:
Quotation marks 1
Quotation marks 2
Related topics:
Periods and commas with quotation marks
Colons and semicolons with quotation marks
Question marks and exclamation points with quotation marks