The Japanese writing system, developed in the ninth century AD from simplified Chinese characters. There are two types of kana (hiragana and katakana) syllabaries, each with symbols for 46 basic sounds and each of which independently represents all the sounds of the language. Although each derives its simple elements from Chinese characters, the two serve different purposes and differ stylistically. Katakana symbols, which are more angular, are used for foreign words, telegrams, and some children's books and often for advertising in print media, television, and billboards. Hiragana, a cursive, graceful writing system that is used in modern Japanese primarily to perform grammatical functions. In theory, any sound in Japanese can be written using one of the kana systems, but in practice, a combination of the two, together with Chinese characters, is used.