When to use a colon
A colon : introduces something that explains or lists what came before: "Bring three things: a pen, paper and an eraser." It also separates hours from minutes (9:45), chapter from verse (John 3:16), titles from subtitles, and the two sides of a ratio (3:1). In American business letters, a colon follows the greeting ("Dear Ms. Lee:").
In code the colon is everywhere. CSS writes color: red, JSON pairs keys with values ("name": "Ana"), Python ends a line with a colon before an indented block, and :: is the scope operator in C++ and PHP.
Colon look-alikes and when they help
Windows does not allow a colon in file names (along with \ / * ? " < > |), so people who want a name like "Part 1: Intro.docx" paste the modifier letter colon ꞉ instead. It looks the same but counts as a letter-like character, so Windows accepts it. Only use it for names people read; in code, URLs and times that software must understand, the plain colon is the only one that works.
The ratio sign ∶ is the mathematically correct colon for ratios such as 16∶9, with balanced spacing. The fullwidth : is used in Chinese and Japanese text, and the IPA length mark ː (two small triangles) shows long vowels in pronunciation guides, as in /biːt/. For three or four dots stacked vertically, such as ⁝ and ⁞, see the dot symbol page; the triangle of dots ∴ has its own therefore symbol page.
How to type a colon and colon emoticons
On a US keyboard, the colon is Shift + ;, the key to the right of L. With Alt codes, hold Alt and type 58 on the number pad. On phones, it is on the 123 or ?123 keyboard.
Colon emoticons go back to 1982, when computer scientist Scott Fahlman suggested :-) and :-( to mark jokes on a university message board. Many apps now turn text like :) into an emoji automatically, and in Discord and Slack typing a colon followed by a name, such as :heart:, opens the emoji picker. For more text faces, see kaomoji.