A writing system comprises a set of symbols, called a script, as well as the rules by which the script represents a particular language. The earliest writing was invented during the late 4th millennium BC. Throughout history, each writing system invented without prior knowledge of writing gradually evolved from a system of proto-writing that included a small number of ideographs, which were not fully capable of encoding spoken language, and lacked the ability to express a broad range of ideas.
Writing systems are generally classified according to how its symbols, called graphemes, generally relate to units of language. Phonetic writing systems, which include alphabets and syllabaries, use graphemes that correspond to sounds in the corresponding spoken language. Alphabets use graphemes called letters that generally correspond to spoken phonemes, and are typically classified into three categories. In general, pure alphabets use letters to represent both consonant and vowel sounds, while abjads only have letters representing consonants, and abugidas use characters corresponding to consonant–vowel pairs. Syllabaries use graphemes called syllabograms that represent entire syllables or moras. By contrast, logographic (alternatively morphographic) writing systems use graphemes that represent the units of meaning in a language, such as its words or morphemes. Alphabets typically use fewer than 100 distinct symbols, while syllabaries and logographies may use hundreds or thousands respectively.
A writing system also includes any punctuation used to aid readers and encode additional meaning, including that which would be communicated in speech via qualities of rhythm, tone, pitch, accent, inflection, or intonation.