The colon is a
punctuation
Punctuation (or sometimes interpunction) is the use of spacing, conventional signs (called punctuation marks), and certain typographical devices as aids to the understanding and correct reading of written text, whether read silently or aloud. A ...
mark consisting of two equally sized dots aligned vertically. A colon often precedes an explanation, a list,
or a quoted sentence. It is also used between hours and minutes in time,
between certain elements in
medical journal
A medical journal is a peer-reviewed scientific journal that communicates medical information to physicians, other health professionals. Journals that cover many medical specialties are sometimes called general medical journals.
History
The first ...
citations,
chapter and verse in
Bible citation
A citation from the Bible is usually referenced with the book name, chapter number and verse number. Sometimes, the name of the Bible translation is also included. There are several formats for doing so.
Common formats
A common format for bib ...
s, and, in the US, for
salutation
A salutation is a greeting used in a letter or other communication. Salutations can be formal or informal. The most common form of salutation in an English letter is wed by the recipient's given name or title. For each style of salutation there ...
s in
business letters and other
formal letter writing.
History
In
Ancient Greek
Ancient Greek includes the forms of the Greek language used in ancient Greece and the ancient world from around 1500 BC to 300 BC. It is often roughly divided into the following periods: Mycenaean Greek (), Dark Ages (), the Archaic p ...
, in
rhetoric
Rhetoric () is the art of persuasion, which along with grammar and logic (or dialectic), is one of the three ancient arts of discourse. Rhetoric aims to study the techniques writers or speakers utilize to inform, persuade, or motivate par ...
and
prosody, the term (', 'limb, member of a body') did not refer to punctuation, but to a member or section of a complete thought or passage; see also ''
Colon (rhetoric)''. From this usage, in
palaeography
Palaeography ( UK) or paleography ( US; ultimately from grc-gre, , ''palaiós'', "old", and , ''gráphein'', "to write") is the study of historic writing systems and the deciphering and dating of historical manuscripts, including the analysi ...
, a colon is a clause or group of clauses written as a line in a
manuscript
A manuscript (abbreviated MS for singular and MSS for plural) was, traditionally, any document written by hand – or, once practical typewriters became available, typewritten – as opposed to mechanically printed or reproduced ...
.
[''Oxford English Dictionary'', 1st ed. "colon, ''n.²''" Oxford University Press (Oxford), 1891.]
In the 3rd century BC,
Aristophanes of Byzantium is alleged to have devised
a punctuation system, in which the end of such a was thought to occasion a medium-length breath, and was marked by a
middot . In practice, we don't have much evidence for its early usage, but it was revived later as the ''
ano teleia
An interpunct , also known as an interpoint, middle dot, middot and centered dot or centred dot, is a punctuation mark consisting of a vertically centered dot used for interword separation in ancient Latin script. (Word-separating spaces did no ...
'', the
modern Greek
Modern Greek (, , or , ''Kiní Neoellinikí Glóssa''), generally referred to by speakers simply as Greek (, ), refers collectively to the dialects of the Greek language spoken in the modern era, including the official standardized form of the ...
semicolon
The semicolon or semi-colon is a symbol commonly used as orthographic punctuation. In the English language, a semicolon is most commonly used to link (in a single sentence) two independent clauses that are closely related in thought. When a ...
.
[Nicolas, Nick.]
Greek Unicode Issues: Punctuation
". 2005. Accessed 7 October 2014. Some writers also used a
double dot symbol , that later came to be used as a
full stop
The full stop ( Commonwealth English), period ( North American English), or full point , is a punctuation mark. It is used for several purposes, most often to mark the end of a declarative sentence (as distinguished from a question or exclam ...
or to mark a change of speaker. (See also ''
Punctuation in Ancient Greek''.)
In 1589, in ''The Arte of English Poesie'', the
English term ''colon'' and the corresponding punctuation mark is attested:
For these respectes the auncient reformers of language, inuented, three maner of pauses ..The shortest pause or intermission they called ''comma'' ..The second they called ''colon'', not a peece but as it were a member for his larger length, because it occupied twise as much time as the comma. The third they called ''periodus'', ..
In 1622, in
Nicholas Okes
Nicholas Okes (died 1645) was an English printer in London of the Jacobean and Caroline eras, remembered for printing works of English Renaissance drama. He was responsible for early editions of works by many of the playwrights of the period, i ...
' print of
William Shakespeare
William Shakespeare ( 26 April 1564 – 23 April 1616) was an English playwright, poet and actor. He is widely regarded as the greatest writer in the English language and the world's pre-eminent dramatist. He is often called England's natio ...
's ''
Othello
''Othello'' (full title: ''The Tragedy of Othello, the Moor of Venice'') is a tragedy written by William Shakespeare, probably in 1603, set in the contemporary Ottoman–Venetian War (1570–1573) fought for the control of the Island of Cyp ...
'', the typographical construction of a colon followed by a
hyphen
The hyphen is a punctuation mark used to join words and to separate syllables of a single word. The use of hyphens is called hyphenation. ''Son-in-law'' is an example of a hyphenated word. The hyphen is sometimes confused with dashes ( figur ...
or
dash to indicate a restful pause is attested. This construction, known as the ''
dog's bollocks'', was once common in
British English
British English (BrE, en-GB, or BE) is, according to Lexico, Oxford Dictionaries, "English language, English as used in Great Britain, as distinct from that used elsewhere". More narrowly, it can refer specifically to the English language in ...
; though this usage is now discouraged.
As late as the 18th century,
John Mason related the appropriateness of a colon to the length of the pause taken when reading the text aloud, but silent reading eventually replaced this with other considerations.
Usage in English
In modern English usage, a complete sentence precedes a colon, while a list, description, explanation, or definition follows it. The elements which follow the colon may or may not be a complete sentence: since the colon is preceded by a sentence, it is a complete sentence whether what follows the colon is another sentence or not. While it is acceptable to capitalise the first letter after the colon in American English, it is not the case in British English, except where a proper noun immediately follows a colon.
;Colon used before list
:''Daequan was so hungry that he ate everything in the house: chips, cold pizza, pretzels and dip, hot dogs, peanut butter, and candy.''
;Colon used before a description
:''Bertha is so desperate that she'll date anyone, even William: he's uglier than a squashed toad on the highway, and that's on his good days.''
;Colon before definition
:''For years while I was reading Shakespeare's ''Othello'' and criticism on it, I had to constantly look up the word "egregious" since the villain uses that word: outstandingly bad or shocking.''
;Colon before explanation
:''I guess I can say I had a rough weekend: I had chest pain and spent all Saturday and Sunday in the emergency room.''
Some writers use fragments (incomplete sentences) before a colon for emphasis or stylistic preferences (to show a character's voice in literature), as in this example:
:''Dinner: chips and juice. What a well-rounded diet I have.''
The Bedford Handbook describes several uses of a colon. For example, one can use a colon after an independent clause to direct attention to a list, an
appositive or a quotation, and it can be used between independent clauses if the second summarizes or explains the first. In non-literary or non-expository uses, one may use a colon after the salutation in a formal letter, to indicate hours and minutes, to show proportions, between a title and subtitle, and between city and publisher in bibliographic entries.
Luca Serianni, an Italian scholar who helped to define and develop the colon as a punctuation mark, identified four punctuational modes for it: ''syntactical-deductive'', ''syntactical-descriptive'', ''appositive'', and ''segmental''.
Syntactical-deductive
The colon introduces the
logical consequence, or effect, of a fact stated before.
:''There was only one possible explanation: the train had never arrived.''
Syntactical-descriptive
In this sense the colon introduces a description; in particular, it makes explicit the elements of a set.
:''I have three sisters: Daphne, Rose, and Suzanne.''
Syntactical-descriptive colons may separate the numbers indicating
hour
An hour (symbol: h; also abbreviated hr) is a unit of time conventionally reckoned as of a day and scientifically reckoned between 3,599 and 3,601 seconds, depending on the speed of Earth's rotation. There are 60 minutes in an hour, and 24 ho ...
s,
minute
The minute is a unit of time usually equal to (the first sexagesimal fraction) of an hour, or 60 seconds. In the UTC time standard, a minute on rare occasions has 61 seconds, a consequence of leap seconds (there is a provision to insert a n ...
s, and
seconds in abbreviated measures of time.
:''The concert begins at 21:45.''
:''The rocket launched at 09:15:05.''
British English
British English (BrE, en-GB, or BE) is, according to Lexico, Oxford Dictionaries, "English language, English as used in Great Britain, as distinct from that used elsewhere". More narrowly, it can refer specifically to the English language in ...
, however, more frequently uses a
point for this purpose:
:''The programme will begin at 8.00 pm.''
:''You will need to arrive by 14.30.''
A colon is also used in the descriptive location of a book verse if the book is divided into verses, such as in the
Bible
The Bible (from Koine Greek , , 'the books') is a collection of religious texts or scriptures that are held to be sacred in Christianity, Judaism, Samaritanism, and many other religions. The Bible is an anthologya compilation of texts o ...
or the
Quran
The Quran (, ; Standard Arabic: , Quranic Arabic: , , 'the recitation'), also romanized Qur'an or Koran, is the central religious text of Islam, believed by Muslims to be a revelation from God. It is organized in 114 chapters (pl.: , sing.: ...
:
:"Isaiah 42:8"
:"Deuteronomy 32:39"
:"Quran 10:5"
Appositive
:''Luruns could not speak: he was drunk.''
An appositive colon also separates the
subtitle of a work from its principal title. (In effect, the example given above illustrates an appositive use of the colon as an abbreviation for the conjunction 'because'.) Dillon has noted the impact of colons on scholarly articles, but the reliability of colons as a predictor of quality or impact has also been challenged. In titles, neither needs to be a complete sentence as titles do not represent
expository
Narrative exposition is the insertion of background information within a story or narrative. This information can be about the setting
Setting may refer to:
* A location (geography) where something is set
* Set construction in theatrical scene ...
writing:
:''Star Wars Episode VI: Return of the Jedi''
Segmental
Like a
dash or
quotation mark
Quotation marks (also known as quotes, quote marks, speech marks, inverted commas, or talking marks) are punctuation marks used in pairs in various writing systems to set off direct speech, a quotation, or a phrase. The pair consists of an ...
, a segmental colon introduces
speech
Speech is a human vocal communication using language. Each language uses phonetic combinations of vowel and consonant sounds that form the sound of its words (that is, all English words sound different from all French words, even if they are th ...
. The segmental function was once a common means of indicating an unmarked quotation on the same line. The following example is from the grammar book ''
The King's English
''The King's English'' is a book on English usage and grammar. It was written by the brothers Henry Watson Fowler and Francis George Fowler and published in 1906; it thus predates by twenty years '' Modern English Usage'', which was written by ...
'':
:''Benjamin Franklin proclaimed the virtue of frugality: A penny saved is a penny earned.''
This form is still used in written
dialogue
Dialogue (sometimes spelled dialog in American English) is a written or spoken conversational exchange between two or more people, and a literary and theatrical form that depicts such an exchange. As a philosophical or didactic device, it is ...
s, such as in a
play. The colon indicates that the words following an individual's name are spoken by that individual.
:''Patient: Doctor, I feel like a pair of curtains.''
:''Doctor: Pull yourself together!''
Use of capitals
Use of capitalization or lower-case after a colon varies. In
British English
British English (BrE, en-GB, or BE) is, according to Lexico, Oxford Dictionaries, "English language, English as used in Great Britain, as distinct from that used elsewhere". More narrowly, it can refer specifically to the English language in ...
, and in most
Commonwealth
A commonwealth is a traditional English term for a political community founded for the common good. Historically, it has been synonymous with " republic". The noun "commonwealth", meaning "public welfare, general good or advantage", dates from th ...
countries, the word following the colon is in lower case unless it is normally capitalized for some other reason, as with
proper noun
A proper noun is a noun that identifies a single entity and is used to refer to that entity (''Africa'', '' Jupiter'', ''Sarah'', '' Microsoft)'' as distinguished from a common noun, which is a noun that refers to a class of entities (''contine ...
s and
acronym
An acronym is a word or name formed from the initial components of a longer name or phrase. Acronyms are usually formed from the initial letters of words, as in '' NATO'' (''North Atlantic Treaty Organization''), but sometimes use syllables, a ...
s. British English also capitalizes a new sentence introduced by colon's
segmental use.
American English
American English, sometimes called United States English or U.S. English, is the set of varieties of the English language native to the United States. English is the most widely spoken language in the United States and in most circumstances ...
goes further and permits writers to similarly capitalize the first word of any
independent clause following a colon. This follows the guidelines of some modern American style guides, including those published by the
Associated Press
The Associated Press (AP) is an American non-profit news agency headquartered in New York City. Founded in 1846, it operates as a cooperative, unincorporated association. It produces news reports that are distributed to its members, U.S. n ...
and the
Modern Language Association. ''
The Chicago Manual of Style
''The Chicago Manual of Style'' (abbreviated in writing as ''CMOS'' or ''CMS'', or sometimes as ''Chicago'') is a style guide for American English published since 1906 by the University of Chicago Press. Its 17 editions have prescribed writ ...
'', however, requires capitalization only when the colon introduces a direct quotation, a direct question, or two or more complete sentences.
In many
Europe
Europe is a large peninsula conventionally considered a continent in its own right because of its great physical size and the weight of its history and traditions. Europe is also considered a subcontinent of Eurasia and it is located enti ...
an languages, the colon is usually followed by a lower-case letter unless the upper case is required for other reasons, as with British English.
German
German(s) may refer to:
* Germany (of or related to)
**Germania (historical use)
* Germans, citizens of Germany, people of German ancestry, or native speakers of the German language
** For citizens of Germany, see also German nationality law
**Ger ...
usage requires capitalization of
independent clauses following a colon.
Dutch further capitalizes the first word of any quotation following a colon, even if it is not a complete sentence on its own.
Spacing
In print, a thin space was traditionally placed before a colon and a thick space after it. In modern
English-language
English is a West Germanic language of the Indo-European language family, with its earliest forms spoken by the inhabitants of early medieval England. It is named after the Angles, one of the ancient Germanic peoples that migrated to t ...
printing, no space is placed before a colon and a single space is placed after it. In
French-language typing and printing, the traditional rules are preserved.
One or two spaces may be and have been used after a colon. The older convention (designed to be used by
monospaced fonts) was to use ''two'' spaces after a colon.
Usage in other languages
Suffix separator
In
Finnish and
Swedish
Swedish or ' may refer to:
Anything from or related to Sweden, a country in Northern Europe. Or, specifically:
* Swedish language, a North Germanic language spoken primarily in Sweden and Finland
** Swedish alphabet, the official alphabet used by ...
, the colon can appear inside words in a manner similar to the
apostrophe
The apostrophe ( or ) is a punctuation mark, and sometimes a diacritical mark, in languages that use the Latin alphabet and some other alphabets. In English, the apostrophe is used for two basic purposes:
* The marking of the omission of one ...
in the English
possessive case
A possessive or ktetic form (abbreviated or ; from la, possessivus; grc, κτητικός, translit=ktētikós) is a word or grammatical construction used to indicate a relationship of possession in a broad sense. This can include strict owne ...
, connecting a grammatical
suffix to an
abbreviation or
initialism
An acronym is a word or name formed from the initial components of a longer name or phrase. Acronyms are usually formed from the initial letters of words, as in ''NATO'' (''North Atlantic Treaty Organization''), but sometimes use syllables, as ...
, a special symbol, or a
digit
Digit may refer to:
Mathematics and science
* Numerical digit, as used in mathematics or computer science
** Hindu-Arabic numerals, the most common modern representation of numerical digits
* Digit (anatomy), the most distal part of a limb, such ...
(e.g., Finnish ''USA:n'' and Swedish ''USA:s'' for the
genitive case
In grammar, the genitive case ( abbreviated ) is the grammatical case that marks a word, usually a noun, as modifying another word, also usually a noun—thus indicating an attributive relationship of one noun to the other noun. A genitive can ...
of "USA", Finnish ''%:ssa'' for the
inessive case of "%", or Finnish ''20:een'' for the
illative case of "20").
Abbreviation mark
Written Swedish uses colons in
contractions, such as ''S:t'' for ''Sankt'' (Swedish for "Saint") – for example in the name of the
Stockholm metro
The Stockholm metro ( sv, Stockholms tunnelbana) is a rapid transit system in Stockholm, Sweden. The first line opened in 1950, and today the system has 100 stations in use, of which 47 are underground and 53 above ground. There are three colo ...
station ''
S:t Eriksplan'', and ''k:a'' for ''kyrka'' ("church") – for instance
Svenska k:a (Svenska kyrkan), the Evangelical Lutheran national Church of Sweden. This can even occur in people's names, for example
Antonia Ax:son Johnson (''
Ax:son'' for ''Axelson'').
Early Modern English
Early Modern English or Early New English (sometimes abbreviated EModE, EMnE, or ENE) is the stage of the English language from the beginning of the Tudor period to the English Interregnum and Restoration, or from the transition from Middl ...
texts also used colons to mark abbreviations.
Word separator

In
Ethiopia
Ethiopia, , om, Itiyoophiyaa, so, Itoobiya, ti, ኢትዮጵያ, Ítiyop'iya, aa, Itiyoppiya officially the Federal Democratic Republic of Ethiopia, is a landlocked country in the Horn of Africa. It shares borders with Eritrea to the Er ...
, both
Amharic and
Ge'ez script used and sometimes still use a
colon-like mark as
word separator.
End of sentence or verse
In
Armenian
Armenian may refer to:
* Something of, from, or related to Armenia, a country in the South Caucasus region of Eurasia
* Armenians, the national people of Armenia, or people of Armenian descent
** Armenian Diaspora, Armenian communities across the ...
, a colon indicates the end of a sentence, similar to a Latin
full stop
The full stop ( Commonwealth English), period ( North American English), or full point , is a punctuation mark. It is used for several purposes, most often to mark the end of a declarative sentence (as distinguished from a question or exclam ...
or period.
In
Hebrew
Hebrew (; ; ) is a Northwest Semitic language of the Afroasiatic language family. Historically, it is one of the spoken languages of the Israelites and their longest-surviving descendants, the Jews and Samaritans. It was largely preserved ...
, the
sof pasuq
The ''sof passuk'' (Hebrew: , ''end of verse'', also spelled sof pasuq and other variant English spellings, and sometimes called סילוק silluq) is the cantillation mark that occurs on the last word of every verse, or '' passuk'', in the Tanak ...
is used in some writings such as prayer books to signal the end of a verse.
Score divider
In
German
German(s) may refer to:
* Germany (of or related to)
**Germania (historical use)
* Germans, citizens of Germany, people of German ancestry, or native speakers of the German language
** For citizens of Germany, see also German nationality law
**Ger ...
, a colon divides the scores of opponents in sports and games. A result of
149–0 would be written as 149 : 0 in German.
Mathematics and logic
The colon is used in
mathematics,
cartography
Cartography (; from grc, χάρτης , "papyrus, sheet of paper, map"; and , "write") is the study and practice of making and using maps. Combining science, aesthetics and technique, cartography builds on the premise that reality (or an ...
,
model building, and other fields—in this context it denotes a
ratio
In mathematics, a ratio shows how many times one number contains another. For example, if there are eight oranges and six lemons in a bowl of fruit, then the ratio of oranges to lemons is eight to six (that is, 8:6, which is equivalent to the ...
or a
scale
Scale or scales may refer to:
Mathematics
* Scale (descriptive set theory), an object defined on a set of points
* Scale (ratio), the ratio of a linear dimension of a model to the corresponding dimension of the original
* Scale factor, a number ...
, as in 3∶1 (pronounced "three to one").
When a ratio is
reduced to a simpler form, such as 10∶15 to 2∶3, this may be expressed with a
double colon as 10∶15∶∶2∶3; this would be read "10 is to 15 as 2 is to 3". This form is also used in tests of logic where the question of "Dog is to Puppy as Cat is to _____?" can be expressed as "Dog∶Puppy∶∶Cat∶_____". For these usages the proper
Unicode
Unicode, formally The Unicode Standard,The formal version reference is is an information technology standard for the consistent encoding, representation, and handling of text expressed in most of the world's writing systems. The standard, ...
symbol is that is a little higher up than the normal colon. Compare 2∶3 (ratio colon) with 2:3 (normal colon).
In some languages (e.g. German, Russian and French), the colon is the commonly used sign for division (instead of ÷).
The notation , : , may also denote the
index of a subgroup.
The notation indicates that is a
function with domain and codomain .
The combination with an equal sign () is used for
definition
A definition is a statement of the meaning of a term (a word, phrase, or other set of symbols). Definitions can be classified into two large categories: intensional definitions (which try to give the sense of a term), and extensional definitio ...
s.
In
mathematical logic
Mathematical logic is the study of formal logic within mathematics. Major subareas include model theory, proof theory, set theory, and recursion theory. Research in mathematical logic commonly addresses the mathematical properties of formal ...
, when using
set-builder notation
In set theory and its applications to logic, mathematics, and computer science, set-builder notation is a mathematical notation for describing a set by enumerating its elements, or stating the properties that its members must satisfy.
Definin ...
for describing the characterizing property of a
set, it is used as an alternative to a
vertical bar (which is the
ISO 31-11 standard), to mean "such that". Example:
:
(''S'' is the set of all in
(the
real number
In mathematics, a real number is a number that can be used to measurement, measure a ''continuous'' one-dimensional quantity such as a distance, time, duration or temperature. Here, ''continuous'' means that values can have arbitrarily small var ...
s) such that is strictly greater than 1 and strictly smaller than 3)
In older literature on mathematical logic, it is used to indicate how expressions should be bracketed (see
Glossary of ''Principia Mathematica'').
In
type theory
In mathematics, logic, and computer science, a type theory is the formal system, formal presentation of a specific type system, and in general type theory is the academic study of type systems. Some type theories serve as alternatives to set theor ...
and
programming language
A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language.
The description of a programming l ...
theory, the colon sign after a term is used to indicate its type, sometimes as a replacement to the "∈" symbol. Example:
:
.
A colon is also sometimes used to indicate a
tensor contraction involving two indices, and a double colon (::) for a contraction over four indices.
A colon is also used to denote a
parallel sum operation involving two operands (many authors, however, instead use a
∥
In geometry, parallel lines are coplanar straight line (geometry), lines that do not intersecting lines, intersect at any point. Parallel planes are plane (geometry), planes in the same three-dimensional space that never meet. ''Parallel curve ...
sign and a few even a
∗ for this purpose).
Computing
The character was on early typewriters and therefore appeared in most text encodings, such as
Baudot code and
EBCDIC
Extended Binary Coded Decimal Interchange Code (EBCDIC; ) is an eight-bit character encoding used mainly on IBM mainframe and IBM midrange computer operating systems. It descended from the code used with punched cards and the corresponding s ...
. It was placed at code 58 in
ASCII
ASCII ( ), abbreviated from American Standard Code for Information Interchange, is a character encoding standard for electronic communication. ASCII codes represent text in computers, telecommunications equipment, and other devices. Because ...
and from there inherited into Unicode. Unicode also defines several related characters.
*
*, used in
IPA
IPA commonly refers to:
* India pale ale, a style of beer
* International Phonetic Alphabet, a system of phonetic notation
* Isopropyl alcohol, a chemical compound
IPA may also refer to:
Organizations International
* Insolvency Practitioner ...
.
*, IPA modifier-letter.
*, used in IPA.
*, IPA modifier-letter.
*, used by
Uralic Phonetic Alphabet
The Uralic Phonetic Alphabet (UPA) or Finno-Ugric transcription system is a phonetic transcription or notational system used predominantly for the transcription and reconstruction of Uralic languages. It was first published in 1901 by Eemil Ne ...
.
*, compatible with right-to-left text.
*, for mathematical usage.
*, for use in pretty-printing programming languages.
*
*
*
*
*
*, see
colon (letter), sometimes used in
Windows
Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for ...
filename
A filename or file name is a name used to uniquely identify a computer file in a directory structure. Different file systems impose different restrictions on filename lengths.
A filename may (depending on the file system) include:
* name &nda ...
s as it is identical to the colon in the
Segoe UI
Segoe ( ) is a typeface, or family of fonts, that is best known for its use by Microsoft. The company uses Segoe in its online and printed marketing materials, including recent logos for a number of products. Additionally, the Segoe UI font su ...
font used for filenames. The colon itself is not permitted as it is a
reserved character
A filename or file name is a name used to uniquely identify a computer file in a directory structure. Different file systems impose different restrictions on filename lengths.
A filename may (depending on the file system) include:
* name &ndas ...
.
*, compatibility character for the Chinese Standard
GB 18030
GB 18030 is a Chinese government standard, described as ''Information Technology — Chinese coded character set'' and defines the required language and character support necessary for software in China. GB18030 is the registered Internet n ...
.
*, for compatibility with
half/full width fonts.
*, compatibility character for the Chinese National Standard
CNS 11643
The CNS 11643 character set (Chinese National Standard 11643), also officially known as the Chinese Standard Interchange Code or CSIC ( zh, tr=, t=中文標準交換碼), is officially the standard character set of Taiwan (Republic of China). In ...
.
Programming languages
A number of programming languages, most notably
Pascal and
Ada, use a colon immediately followed by an equals sign (
:=
) as the
assignment operator
Assignment, assign or The Assignment may refer to:
* Homework
* Sex assignment
* The process of sending National Basketball Association players to its development league; see
Computing
* Assignment (computer science), a type of modification ...
, to distinguish it from a single equals which is an equality test (C instead used a single equals as assignment, and a double equals as the equality test).
Many languages including
C and
Java
Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's mo ...
use the colon to indicate the text before it is a
label
A label (as distinct from signage) is a piece of paper, plastic film, cloth, metal, or other material affixed to a container or product, on which is written or printed information or symbols about the product or item. Information printed d ...
, such as a target for a
goto
GoTo (goto, GOTO, GO TO or other case combinations, depending on the programming language) is a statement found in many computer programming languages. It performs a one-way transfer of control to another line of code; in contrast a function c ...
or an introduction to a case in a
switch statement
In computer programming languages, a switch statement is a type of selection control mechanism used to allow the value of a variable or expression to change the control flow of program execution via search and map.
Switch statements function som ...
.
In a related use,
Python uses a colon to separate a control statement from the block of statements it controls:
if test(x):
print("test(x) is true!")
else:
print("test(x) is not true...")
In a number of languages, including
JavaScript
JavaScript (), often abbreviated as JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. As of 2022, 98% of Website, websites use JavaScript on the Client (computing), client side ...
, colons are used to define
name–value pairs in a
dictionary or
object. This is also used by data formats such as
JSON
JSON (JavaScript Object Notation, pronounced ; also ) is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of attribute–value pairs and arrays (or other s ...
. Some other languages use an equals sign.
var obj =
The colon is used as part of the
?: conditional operator in C and many other languages.
C++ uses a double colon as the
scope resolution operator, and
class member access. Most other languages use a period but C++ had to use this for compatibility with C. Another language using colons for scope resolution is
Erlang, which uses a single colon.
In
BASIC
BASIC (Beginners' All-purpose Symbolic Instruction Code) is a family of general-purpose, high-level programming languages designed for ease of use. The original version was created by John G. Kemeny and Thomas E. Kurtz at Dartmouth College ...
, it is used as a separator between the statements or instructions in a single line. Most other languages use a semicolon, but BASIC had used semicolon to separate items in print statements.
In
Forth
Forth or FORTH may refer to:
Arts and entertainment
* ''forth'' magazine, an Internet magazine
* ''Forth'' (album), by The Verve, 2008
* ''Forth'', a 2011 album by Proto-Kaw
* Radio Forth, a group of independent local radio stations in Scotla ...
, a colon ''precedes'' definition of a new word.
Haskell uses a colon (pronounced as "
cons", short for "construct") as an operator to add an
element to the front of a
list
A ''list'' is any set of items in a row. List or lists may also refer to:
People
* List (surname)
Organizations
* List College, an undergraduate division of the Jewish Theological Seminary of America
* SC Germania List, German rugby uni ...
:
"child" : woman", "man"-- equals child","woman","man"/syntaxhighlight>
while a double colon ::
is read as "has type of" (compare scope resolution operator):
("text", False) :: ( har Bool)
The ML languages (such as Standard ML) have the above reversed, where the double colon (::
) is used to add an element to the front of a list; and the single colon (:
) is used for type guards.
MATLAB
MATLAB (an abbreviation of "MATrix LABoratory") is a proprietary multi-paradigm programming language and numeric computing environment developed by MathWorks. MATLAB allows matrix manipulations, plotting of functions and data, implementa ...
uses the colon as a binary operator that generates vectors, as well as to select particular portions of existing matrices.
APL uses the colon
* to introduce a control structure element. In this usage it must be the first non-blank character of the line.
* after a label name that will be the target of a :goto
or a right-pointing arrow (Note: this style of programming is deprecated and programmers are encouraged to use control structures instead).
* to separate a guard (boolean expression) from its expression in a dynamic function. Two colons are used for an Error guard (one or more error numbers).
* Colon + space are used in class definitions to indicate inheritance.
* ⍠ (a colon in a box) is used by APL for its variant operator.
The colon is also used in many operating systems commands.
In the esoteric programming language INTERCAL, the colon is called "two-spot" and is used to identify a 32-bit variable—distinct from a spot (.) which identifies a 16-bit variable.
Addresses
Internet URLs use the colon to separate the protocol (such as ) from the hostname
In computer networking, a hostname (archaically nodename) is a label that is assigned to a device connected to a computer network and that is used to identify the device in various forms of electronic communication, such as the World Wide Web. Hos ...
or IP address
An Internet Protocol address (IP address) is a numerical label such as that is connected to a computer network that uses the Internet Protocol for communication.. Updated by . An IP address serves two main functions: network interface ident ...
.
In an IPv6 address
An Internet Protocol Version 6 address (IPv6 address) is a numeric label that is used to identify and locate a network interface of a computer or a network node participating in a computer network using IPv6. IP addresses are included in the p ...
colons (and one optional double colon) separate up to 8 groups of 16 bit
The bit is the most basic unit of information in computing and digital communications. The name is a portmanteau of binary digit. The bit represents a logical state with one of two possible values. These values are most commonly represented a ...
s in hexadecimal
In mathematics and computing, the hexadecimal (also base-16 or simply hex) numeral system is a positional numeral system that represents numbers using a radix (base) of 16. Unlike the decimal system representing numbers using 10 symbols, h ...
representation. In a URL
A Uniform Resource Locator (URL), colloquially termed as a web address, is a reference to a web resource that specifies its location on a computer network and a mechanism for retrieving it. A URL is a specific type of Uniform Resource Identifie ...
a colon follows the initial scheme name (such as HTTP
The Hypertext Transfer Protocol (HTTP) is an application layer protocol in the Internet protocol suite model for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web, ...
and FTP), and separates a port number
In computer networking, a port is a number assigned to uniquely identify a connection endpoint and to direct data to a specific service. At the software level, within an operating system, a port is a logical construct that identifies a specific ...
from the hostname
In computer networking, a hostname (archaically nodename) is a label that is assigned to a device connected to a computer network and that is used to identify the device in various forms of electronic communication, such as the World Wide Web. Hos ...
or IP address
An Internet Protocol address (IP address) is a numerical label such as that is connected to a computer network that uses the Internet Protocol for communication.. Updated by . An IP address serves two main functions: network interface ident ...
.
In Microsoft Windows filename
A filename or file name is a name used to uniquely identify a computer file in a directory structure. Different file systems impose different restrictions on filename lengths.
A filename may (depending on the file system) include:
* name &nda ...
s, the colon is reserved for use in alternate data streams
New Technology File System (NTFS) is a proprietary journaling file system developed by Microsoft. Starting with Windows NT 3.1, it is the default file system of the Windows NT family. It superseded File Allocation Table (FAT) as the preferred f ...
and cannot appear in a filename. It was used as the directory separator in Classic Mac OS, and was difficult to use in early versions of the newer BSD-based macOS
macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac (computer), Mac computers. Within the market of ...
due to code swapping the slash and colon to try to preserve this usage. In most systems it is often difficult to put a colon in a filename as the shell interprets it for other purposes.
CP/M and early versions of MSDOS required the colon after the names of devices, such as though this gradually disappeared except for disks (where it had to be between the disk name and the required path representation of the file as in C:\Windows\
). This then migrated to use in URLs.
Text markup
It is often used as a single post-fix delimiter, signifying a token keyword had immediately preceded it or the transition from one mode of character string interpretation to another related mode. Some applications, such as the widely used MediaWiki
MediaWiki is a Free and open-source software, free and open-source wiki software. It is used on Wikipedia and almost all other Wikimedia movement, Wikimedia Website, websites, including Wiktionary, Wikimedia Commons and Wikidata; these sit ...
, utilize the colon as both a pre-fix and post-fix delimiter.
In wiki markup
A wiki ( ) is an online hypertext publication collaboratively edited and managed by its own audience, using a web browser. A typical wiki contains multiple pages for the subjects or scope of the project, and could be either open to the p ...
, the colon is often used to indent text. Common usage includes separating or marking comments in a discussion as replies, or to distinguish certain parts of a text.
In human-readable text messages, a colon, or multiple colons, is sometimes used to denote an action (similar to how asterisk
The asterisk ( ), from Late Latin , from Ancient Greek , ''asteriskos'', "little star", is a typographical symbol. It is so called because it resembles a conventional image of a heraldic star.
Computer scientists and mathematicians often vo ...
s are used) or to emote (for example, in vBulletin). In the action denotation usage it has the inverse function of quotation marks, denoting actions where unmarked text is assumed to be dialogue. For example:
:Tom: Pluto is so small; it should not be considered a planet. It is tiny!
:Mark: Oh really? ::drops Pluto on Tom's head:: Still think it's small now?
Colons may also be used for sounds, e.g., ::click::, though sounds can also be denoted by asterisks or other punctuation marks.
Colons can also be used to represent eyes in emoticon
An emoticon (, , rarely , ), short for "emotion icon", also known simply as an emote, is a pictorial representation of a facial expression using characters—usually punctuation marks, numbers, and letters—to express a person's feelings, m ...
s.
See also
* Semicolon
The semicolon or semi-colon is a symbol commonly used as orthographic punctuation. In the English language, a semicolon is most commonly used to link (in a single sentence) two independent clauses that are closely related in thought. When a ...
()
* Two dots (disambiguation)
Notes
References
External links
*
Walden University Guides
Punctuation: Colons
{{Authority control
Punctuation
Typographical symbols