A key signature in music indicates which notes are to be played as sharps or flats throughout a piece of music. It appears at the beginning of a staff, immediately after the clef and before the time signature.
Order of Sharps: Sharps appear in the order F, C, G, D, A, E, B.
Order of Flats: Flats appear in the order B, E, A, D, G, C, F.
C Major: No sharps or flats. All notes are natural.
G Major: One sharp (F#).
D Major: Two sharps (F#, C#).
A Major: Three sharps (F#, C#, G#).
E Major: Four sharps (F#, C#, G#, D#).
F Major: One flat (B
)
B flat Major: Two flats (B
, E