Brackets are punctuation marks, used in pairs to set apart or interject text within other text. Types of brackets include parentheses ( ), square brackets [ ], braces { }, and angle brackets < >. All these forms may be used according to typographical conventions that may vary from publication to publication. Some typical uses follow.

Types of brackets

Parentheses ()

Parentheses are used to contain parenthetical (or optional, additional) material in a sentence that could be removed without destroying the meaning of the main text. For example, "George Washington (the father of his country) was not the wooden figure with wooden teeth that many think him." Indeed, such an interjection is called a parenthesis, and may also be set off with dasheses or commass.

Parentheses may be used to add supplementary information, such as "Sen. Kennedy (D., Massachusetts) spoke at length."

Parentheses may also be nested (with one set inside another set (but this is not commonly used in formal writing)).

Any punctuation inside parentheses or other brackets is independent from the rest of the text: "Mrs. Pennyfarthing (What? Yes, that was her name!) was my landlady."

Square brackets []

Square brackets are used to enclose explanatory or missing [...] material, especially in quoted text. For example, "I appreciate it [the honor], but I must refuse." Or, "The future of psionics [See definition] is in doubt."

The bracketed expression [sic] (Latin for "thus") is used to indicate errors that are "thus in the original"; a bracketed ellipsis [...] is used to indicate deleted material; bracketed comments are used to indicate when original text has been modified: "I'd like to thank [several unimportant people] and my parentals [sic] for their love, tolerance [...] and assistance [italics added]."

Braces {}

Braces are sometimes used in prose to indicate a series of equal choices: "Select your animal {goat, sheep, cow, horse} and follow me." They are used in specialized ways in poetry and music (to mark repeats or joined lines). In mathematics they are used to delimit sets.

Angle brackets <>

Angle brackets (<,>) are often used to enclose highlighted material, such as URLs in text, such as "I found it in the Wikipedia ."

Single and double angle brackets (<<,>>) are sometimes used instead of guillemets, where the proper glyphs aren't available.

(Angle bracket glyphs are also sometimes used individually, to represent the mathematical or logical symbols for greater-than (>) and less-than (<)... but these are not punctuation marks!)

Alternate names for brackets

Parentheses are sometimes called round brackets, curved brackets or, colloquially, parens, or fingernails. John Lennard (in "The exploitation of parentheses in English printed verse") usefully coined the term lunula to refer specifically to the opening curved bracket, the closing curved bracket and the textual contents between.

Square brackets are called crochets in Great Britain.

Braces are often called curly brackets. Presumably due to the similarity of the word "brace" and "bracket", many people apparently (and incorrectly) believe that "brace" is a synonym for "bracket". Therefore, when it is necessary to avoid any possibility of confusion, e.g., in computer programming, it may be best to use the term "curly bracket" rather than "brace". However, general usage in English favors the latter form. The term curly braces is redundant since that is the only kind of braces there are.

Brackets in computing

Also, in many programming languages:
  • "(" and ")" are used to contain the arguments to functions: substring($val,10,1). Parentheses are so ubiquitous in the Lisp programming language that the name is said to be an acronym for "Lots of Irritating Superfluous Parentheses". They may also be used to indicate the start and end of lists.
  • "[" and "]" are used to define elements in an array: $animals["goat"].
  • "{" and "}" are used to define the beginning and ending of blocks of code. To complicate things, in the Pascal programming language, "{" and "}" define the beginning and ending of comments.
  • "<" and ">" are used in SGML (and other formats based on SGML, such as HTML and XML), to enclose code tags.

In the Wikipedia editor, and some other Wikis, square brackets are used to link to external sources; doubled square brackets are used to link to pages within Wikipedia.