What are "p's" and "q's"?
What does the phrase "mind your 'p's' and 'q's'" come from?
You can find helpful answers to questions like this in the alt.usage.english FAQ.
According to the FAQ, there are several theories about how the expression, which means "to be careful to behave correctly," was first used.
- It was a warning to children learning to write.
- It was a warning to typesetters (who had to look at the letters reversed).
- It means "mind your pints and quarts."
- It means "mind your prices and quality."
There are other theories but as the FAQ points out, the most plausible might be the explanation given by the Collins English Dictionary. The CED says that it is an alteration of the expression, "mind your please's and thank you's."