HOME

TheInfoList



OR:

The colon, , is a
punctuation Punctuation marks are marks indicating how a piece of writing, written text should be read (silently or aloud) and, consequently, understood. The oldest known examples of punctuation marks were found in the Mesha Stele from the 9th century BC, c ...
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 citations, between chapter and verse in Bible citations, between two numbers in 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 ...
, and, in the US, for salutations in business letters and other formal letters.


History

In
Ancient Greek Ancient Greek (, ; ) includes the forms of the Greek language used in ancient Greece and the classical antiquity, ancient world from around 1500 BC to 300 BC. It is often roughly divided into the following periods: Mycenaean Greek (), Greek ...
, in
rhetoric Rhetoric is the art of persuasion. It is one of the three ancient arts of discourse ( trivium) along with grammar and logic/ dialectic. As an academic discipline within the humanities, rhetoric aims to study the techniques that speakers or w ...
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 (American and British English spelling differences#ae and oe, UK) or paleography (American and British English spelling differences#ae and oe, US) (ultimately from , , 'old', and , , 'to write') is the study and academic disciplin ...
, 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 typewritten, as opposed to mechanically printed or reproduced in some indirect or automated way. More recently, the term has ...
.''Oxford English Dictionary'', 1st ed. "colon, ''n.2''" 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, evidence is scarce for its early usage, but it was revived later as the '' ano teleia'', the
modern Greek Modern Greek (, or , ), 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 language sometimes referred to ...
semicolon.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 used for several purposes, most often to mark the end of a declarative sentence (as distinguished from a question or exclamation). A ...
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: In 1622, in Nicholas Okes' print of
William Shakespeare William Shakespeare ( 23 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 nation ...
's '' Othello'', 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. The hyphen is sometimes confused with dashes (en dash , em dash and others), which are wider, or with t ...
or
dash The dash is a punctuation mark consisting of a long horizontal line. It is similar in appearance to the hyphen but is longer and sometimes higher from the baseline. The most common versions are the endash , generally longer than the hyphen ...
to indicate a restful pause is attested. This construction, known as the '' dog's bollocks'', was once common in
British English British English is the set of Variety (linguistics), varieties of the English language native to the United Kingdom, especially Great Britain. More narrowly, it can refer specifically to the English language in England, or, more broadly, to ...
, 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 Logical consequence (also entailment or logical implication) is a fundamental concept in logic which describes the relationship between statement (logic), statements that hold true when one statement logically ''follows from'' one or more stat ...
, 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 hours, minutes, and seconds in abbreviated measures of time. :''The concert begins at 21:45.'' :''The rocket launched at 09:15:05.''
British English British English is the set of Variety (linguistics), varieties of the English language native to the United Kingdom, especially Great Britain. More narrowly, it can refer specifically to the English language in England, or, more broadly, to ...
and
Australian English Australian English (AusE, AusEng, AuE, AuEng, en-AU) is the set of variety (linguistics), varieties of the English language native to Australia. It is the country's common language and ''de facto'' national language. While Australia has no of ...
, however, more frequently use 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 is a collection of religious texts that are central to Christianity and Judaism, and esteemed in other Abrahamic religions such as Islam. The Bible is an anthology (a compilation of texts of a variety of forms) originally writt ...
or the
Quran The Quran, also Romanization, romanized Qur'an or Koran, is the central religious text of Islam, believed by Muslims to be a Waḥy, revelation directly from God in Islam, God (''Allah, Allāh''). It is organized in 114 chapters (, ) which ...
: :"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 writing: :''Star Wars Episode VI: Return of the Jedi''


Segmental

Like a
dash The dash is a punctuation mark consisting of a long horizontal line. It is similar in appearance to the hyphen but is longer and sometimes higher from the baseline. The most common versions are the endash , generally longer than the hyphen ...
or quotation mark, a segmental colon introduces
speech Speech is the use of the human voice as a medium for language. Spoken language combines vowel and consonant sounds to form units of meaning like words, which belong to a language's lexicon. There are many different intentional speech acts, suc ...
. 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'': :''Benjamin Franklin proclaimed the virtue of frugality: A penny saved is a penny earned.'' This form is still used in British industry-standard templates for written performance dialogues, such as in a play. The colon indicates that the words following an character's name are spoken by that character. :''Patient: Doctor, I feel like a pair of curtains.'' :''Doctor: Pull yourself together!'' The uniform visual pattern of <character_nametag : character_spoken_lines> placement on a script page assists an actor in scanning for the lines of their assigned character during rehearsal, especially if a script is undergoing rewrites between rehearsals.


Use of capitals

Use of capitalization or lower-case after a colon varies. In
British English British English is the set of Variety (linguistics), varieties of the English language native to the United Kingdom, especially Great Britain. More narrowly, it can refer specifically to the English language in England, or, more broadly, to ...
, and in most Commonwealth 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''; ''Walmart'') as distinguished from a common noun, which is a noun that refers to a class of entities (''continent, ...
s and
acronym An acronym is a type of abbreviation consisting of a phrase whose only pronounced elements are the initial letters or initial sounds of words inside that phrase. Acronyms are often spelled with the initial Letter (alphabet), letter of each wor ...
s. British English also capitalizes a new sentence introduced by a colon's segmental use.
American English American English, sometimes called United States English or U.S. English, is the set of variety (linguistics), varieties of the English language native to the United States. English is the Languages of the United States, most widely spoken lang ...
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 not-for-profit organization, not-for-profit news agency headquartered in New York City. Founded in 1846, it operates as a cooperative, unincorporated association, and produces news reports that are dist ...
and the
Modern Language Association The Modern Language Association of America, often referred to as the Modern Language Association (MLA), is widely considered the principal professional association in the United States for scholars of language and literature. The MLA aims to "str ...
. ''
The Chicago Manual of Style ''The Chicago Manual of Style'' (''CMOS'') is a style guide for American English published since 1906 by the University of Chicago Press. Its 18 editions (the most recent in 2024) have prescribed writing and citation styles widely used in publ ...
'', 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 continent located entirely in the Northern Hemisphere and mostly in the Eastern Hemisphere. It is bordered by the Arctic Ocean to the north, the Atlantic Ocean to the west, the Mediterranean Sea to the south, and Asia to the east ...
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 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 and parentheses

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 that developed in early medieval England and has since become a English as a lingua franca, global lingua franca. The namesake of the language is the Angles (tribe), Angles, one of the Germanic peoples th ...
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 font A monospaced font, also called a fixed-pitch, fixed-width, or non-proportional font, is a font whose letters and characters each occupy the same amount of horizontal space. This contrasts with Typeface#Proportion, variable-width fonts, where t ...
s) was to use ''two'' spaces after a colon. In modern typography, a colon will be placed outside the closing
parenthesis A bracket is either of two tall fore- or back-facing punctuation marks commonly used to isolate a segment of text or data from its surroundings. They come in four main pairs of shapes, as given in the box to the right, which also gives their n ...
introducing a list. In very early English typography, it could be placed inside, as seen in Roger Williams' 1643 book about the Native American languages of New England.


Usage in other languages


Suffix separator

In Finnish and Swedish, the colon can appear inside words in a manner similar to the apostrophe in the English possessive case, connecting a grammatical suffix to an
abbreviation An abbreviation () is a shortened form of a word or phrase, by any method including shortening (linguistics), shortening, contraction (grammar), contraction, initialism (which includes acronym), or crasis. An abbreviation may be a shortened for ...
or
initialism An acronym is a type of abbreviation consisting of a phrase whose only pronounced elements are the initial letters or initial sounds of words inside that phrase. Acronyms are often spelled with the initial letter of each word in all caps wi ...
, a special symbol, or a digit (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 ca ...
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 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 (sometimes abbreviated EModEFor example, or EMnE) or Early New English (ENE) is the stage of the English language from the beginning of the Tudor period to the English Interregnum and Restoration, or from the transit ...
texts also used colons to mark abbreviations.


Word separator

In
Ethiopia Ethiopia, officially the Federal Democratic Republic of Ethiopia, is a landlocked country located in the Horn of Africa region of East Africa. It shares borders with Eritrea to the north, Djibouti to the northeast, Somalia to the east, Ken ...
, both Amharic and Ge'ez script used and sometimes still use a colon-like mark as word separator. Historically, a colon-like mark was used as a word separator in
Old Turkic script The Old Turkic script (also known variously as Göktürk script, Orkhon script, Orkhon-Yenisey script, Turkic runes) was the alphabet used by the Göktürks and other early Turkic peoples, Turkic khanates from the 8th to 10th centuries to recor ...
.


End of sentence or verse

In Armenian, 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 used for several purposes, most often to mark the end of a declarative sentence (as distinguished from a question or exclamation). A ...
or period. In liturgical
Hebrew Hebrew (; ''ʿÎbrit'') is a Northwest Semitic languages, Northwest Semitic language within the Afroasiatic languages, Afroasiatic language family. A regional dialect of the Canaanite languages, it was natively spoken by the Israelites and ...
, the sof pasuq is used in some writings such as prayer books to signal the end of a verse.


Score divider

In German,
Hebrew Hebrew (; ''ʿÎbrit'') is a Northwest Semitic languages, Northwest Semitic language within the Afroasiatic languages, Afroasiatic language family. A regional dialect of the Canaanite languages, it was natively spoken by the Israelites and ...
, and sometimes in English, a colon divides the scores of opponents in sports and games. A result of 149–0 would be written as 149 : 0 in German and in Hebrew.


Mathematics and logic

The colon is used in
mathematics Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
, cartography, 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, 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 uses, there is a dedicated
Unicode Unicode or ''The Unicode Standard'' or TUS is a character encoding standard maintained by the Unicode Consortium designed to support the use of text in all of the world's writing systems that can be digitized. Version 16.0 defines 154,998 Char ...
symbol () that is preferred in some contexts. Compare (ratio colon) with 2:3 (U+003A ASCII 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 In mathematics, specifically group theory, the index of a subgroup ''H'' in a group ''G'' is the number of left Coset, cosets of ''H'' in ''G'', or equivalently, the number of right cosets of ''H'' in ''G''. The index is denoted , G:H, or :Ho ...
. 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 Logic#Formal logic, formal logic within mathematics. Major subareas include model theory, proof theory, set theory, and recursion theory (also known as computability theory). Research in mathematical logic com ...
, when using set-builder notation 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 = \ (''S'' is the set of all in \mathbb (the
real number In mathematics, a real number is a number that can be used to measure a continuous one- dimensional quantity such as a duration or temperature. Here, ''continuous'' means that pairs of values can have arbitrarily small differences. Every re ...
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 and theoretical computer science, a type theory is the formal presentation of a specific type system. Type theory is the academic study of type systems. Some type theories serve as alternatives to set theory as a foundation of ...
and
programming language theory Programming language theory (PLT) is a branch of computer science that deals with the design, implementation, analysis, characterization, and classification of formal languages known as programming languages. Programming language theory is clos ...
, the colon sign after a term is used to indicate its type, sometimes as a replacement to the "∈" symbol. Example: :\lambda x . x \mathrel A \to A . 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 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 The Baudot code () is an early character encoding for telegraphy invented by Émile Baudot in the 1870s. It was the predecessor to the International Telegraph Alphabet No. 2 (ITA2), the most common teleprinter code in use before ASCII. Each ch ...
and EBCDIC. It was placed at code 58 in
ASCII ASCII ( ), an acronym for American Standard Code for Information Interchange, is a character encoding standard for representing a particular set of 95 (English language focused) printable character, printable and 33 control character, control c ...
and from there inherited into Unicode. Unicode also defines several related characters: * *, used in IPA. *, IPA modifier-letter. *, used in IPA. *, IPA modifier-letter. *, used by Uralic Phonetic Alphabet. *, compatible with right-to-left text. *, for mathematical usage. *, for use in pretty-printing programming languages. * * * * * * *, see Colon (letter). (This character is also sometimes used in Windows
filename A filename or file name is a name used to uniquely identify a computer file in a file system. Different file systems impose different restrictions on filename lengths. A filename may (depending on the file system) include: * name – base ...
s as it is identical to the colon in the Segoe UI font used for filenames. The colon itself is not permitted as it is a reserved character.) *, compatibility character for the Chinese Standard GB 18030. *, for compatibility with halfwidth and fullwidth fonts. *, compatibility character for the Chinese National Standard CNS 11643.


Programming languages

Many programming languages, most notably ALGOL, Pascal and Ada, use a colon and equals sign as the assignment operator, to distinguish it from a single equals which is an equality test ( C instead uses a single equals as assignment, and a double equals as the equality test). Many languages including C and
Java Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
use the colon to indicate the text before it is a label, such as a target for a goto 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 ...
. In a related use, Python uses a colon to separate a control statement (the ''clause header'') from the block of statements it controls (the ''suite''): if test(x): print("test(x) is true!") else: print("test(x) is not true...") In many languages, including
JavaScript JavaScript (), often abbreviated as JS, is a programming language and core technology of the World Wide Web, alongside HTML and CSS. Ninety-nine percent of websites use JavaScript on the client side for webpage behavior. Web browsers have ...
, colons are used to define name–value pairs in a
dictionary A dictionary is a listing of lexemes from the lexicon of one or more specific languages, often arranged Alphabetical order, alphabetically (or by Semitic root, consonantal root for Semitic languages or radical-and-stroke sorting, radical an ...
or object. This is also used by data formats such as
JSON JSON (JavaScript Object Notation, pronounced or ) is an open standard file format and electronic data interchange, data interchange format that uses Human-readable medium and data, human-readable text to store and transmit data objects consi ...
. 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 or BASIC may refer to: Science and technology * BASIC, a computer programming language * Basic (chemistry), having the properties of a base * Basic access authentication, in HTTP Entertainment * Basic (film), ''Basic'' (film), a 2003 film ...
, 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, a colon ''precedes'' definition of a new word. Haskell uses a colon (pronounced as " cons", short for "construct") as an operator to add a
data element In metadata, the term data element is an atomic unit of data that has precise meaning or precise semantics. A data element has: # An identification such as a data element name # A clear data element definition # One or more representation term ...
to the front of a
list A list is a Set (mathematics), set of discrete items of information collected and set forth in some format for utility, entertainment, or other purposes. A list may be memorialized in any number of ways, including existing only in the mind of t ...
: "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 uses the colon as a binary operator to generate a vector, or to select a part of an extant matrix. 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 (this style of programming is deprecated and programs are supposed 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 used to label a 32-bit variable, distinct from ''spot'' (.) to label a
16-bit 16-bit microcomputers are microcomputers that use 16-bit microprocessors. A 16-bit register can store 216 different values. The range of integer values that can be stored in 16 bits depends on the integer representation used. With the two ...
variable.


Addresses

Internet URLs use the colon to separate the protocol (such as ) from the hostname or
IP address An Internet Protocol address (IP address) is a numerical label such as that is assigned to a device connected to a computer network that uses the Internet Protocol for communication. IP addresses serve two main functions: network interface i ...
. In an IPv6 address, colons (and one optional double colon) separate up to 8 groups of 16 bits in
hexadecimal Hexadecimal (also known as base-16 or simply hex) is a Numeral system#Positional systems in detail, positional numeral system that represents numbers using a radix (base) of sixteen. Unlike the decimal system representing numbers using ten symbo ...
representation. In a URL, a colon follows the initial scheme name (such as Hypertext Transfer Protocol (
HTTP HTTP (Hypertext Transfer Protocol) 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, wher ...
) and
File Transfer Protocol The File Transfer Protocol (FTP) is a standard communication protocol used for the transfer of computer files from a server to a client on a computer network. FTP is built on a client–server model architecture using separate control and d ...
(FTP), and separates a port number from the hostname or
IP address An Internet Protocol address (IP address) is a numerical label such as that is assigned to a device connected to a computer network that uses the Internet Protocol for communication. IP addresses serve two main functions: network interface i ...
. In
Microsoft Windows Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
filename A filename or file name is a name used to uniquely identify a computer file in a file system. Different file systems impose different restrictions on filename lengths. A filename may (depending on the file system) include: * name – base ...
s, the colon is reserved for use in alternate data streams and cannot appear in a filename. It was used as the directory separator in
Classic Mac OS Mac OS (originally System Software; retronym: Classic Mac OS) is the series of operating systems developed for the Mac (computer), Macintosh family of personal computers by Apple Computer, Inc. from 1984 to 2001, starting with System 1 and end ...
, 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, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
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, utilize the colon as both a pre-fix and post-fix delimiter. In wiki markup, 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 , , "little star", is a Typography, typographical symbol. It is so called because it resembles a conventional image of a star (heraldry), heraldic star. Computer scientists and Mathematici ...
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, is a pictorial representation of a facial expression using Character (symbol), characters—usually punctuation marks, numbers and Alphabet, letters—to express a person's feelings, mood ...
s.


See also

* Semicolon () * Two dots (disambiguation)


Notes


References


External links

*
Walden University Guides
Punctuation: Colons {{Authority control Punctuation Typographical symbols Programming language comparisons Articles with example Haskell code Articles with example JavaScript code Articles with example Python (programming language) code