mnemonic

a device to aid memory, particularly one where a phrase is created using the initial letters of the thing to be memorised. Every good boy deserves favour - for the notes on the scale EGBDF; Richard of York gave battle in vain - for the colours of the rainbow Red Orange Yellow Green Blue Indigo and Violet. The more striking the phrase the more likely the memory will last.