Spelling is a set of conventions for written language regarding how graphemes should correspond to the sounds of spoken language. Spelling is one of the elements of orthography, and highly standardized spelling is a prescriptive element.
Spellings originated as transcriptions of the sounds of speech according to the alphabetic principle.