Japanese text is written with a mixture of kanji, katakana and hiragana syllabaries. Almost all kanji originated in China, and may have more than one meaning and pronunciation. Kanji compounds generally derive their meaning from the combined kanji. For example, Tokyo (東京) is written with two kanji: "east" (東) + "capital" (京). The kanji, however, are pronounced differently from their Chinese relatives. For example, in modern mandarin Chinese, these two kanji would be "Dongjing." The name was chosen because Tokyo was to be the eastern capital of Japan, relative to its previous capital city, Kyoto (京都). (Some other kanji compounds use characters chosen primarily for their pronunciations. Such characters are called ateji.) In addition to native words and placenames, kanji are used to write Japanese family names and most Japanese given names.
Centuries ago, hiragana and katakana, the two kana syllabaries, derived their shapes from particular kanji pronounced in the same way. However, unlike kanji, kana have no meaning, and are used only to represent sounds. Hiragana are generally used to write some Japanese words and given names and grammatical aspects of Japanese. For example, the Japanese word for "to do" (する suru) is written with two hiragana: す (su) + る (ru). Katakana are generally used to write loanwords, foreign names and onomatopoeia. For example, retasu was borrowed from the English "lettuce", and is written with three katakana: レ (re) + タ (ta) + ス (su). The onomatopoeia for the sound of typing is kata kata, and is written with 4 katakana: カ (ka) + タ (ta) + カ (ka) + タ (ta). It is common nowadays to see many businesses using katakana in place of hiragana and kanji in advertising. Additionally, people may use katakana when writing their names or informal documents for aesthetic reasons.
Roman characters have also recently become popular for certain purposes in Japanese.