The grave accent ( ` ) is a diacritical mark used in written Catalan, French, Greek until 1982 (polytonic orthography), Italian, Norwegian, Occitan, Portuguese, Scottish Gaelic, Vietnamese, Welsh, Dutch, and other languages.
The word grave is derived from the Latin gravis (heavy). In English the word is sometimes pronounced "grahv", IPA /ɡɹɑːv/, not like grave meaning "serious" or a "tomb". It comes from French, where it is pronounced similarly: accent grave .
Phonetically, the grave accent originally marked a heavier and louder tone, as opposed to the acute accent that marked a sharp pitch. Visually as well, it is the exact opposite of the acute accent, being its mirror image. In nearly all fonts, the accent mark is similar to a top-heavy triangle with its sharp point extending rightwards.
In Italian there are pairs of words, one accented and the other not, with different pronunciation and meaning, such as pero "pear tree" and però "but", and papa "pope" and papà "dad"
In Norwegian (both Bokmål and Nynorsk), the grave accent is used to indicate stress on a syllable that would otherwise be unstressed. Popular usage, possibly because Norwegian rarely uses diacritics, does not respect these rules much, and there is a certain interchangeability with the acute accent.
In Scottish Gaelic, it denotes a long vowel (the use of both é and ó in addition to è and ò is now discouraged, and only the grave accent is used).
Italics, with appropriate accents, are generally applied to foreign terms that are uncommonly used in or have not been assimilated into English: for example, vis-à-vis, pièce de résistance and crème brûlée
In the ASCII character set the grave accent is encoded as character 96, hex 60. Unicode also provides the grave accent as a combining character, encoded as 768, hex 300. Outside the US, character 96 is often replaced by accented letters. In the French ISO 646 standard, the character at this position is µ. Many older UK computers, such as the ZX Spectrum and BBC Micro, have the £ symbol as character 96, though the British ISO 646 variant ultimately placed this symbol at position 35 instead.
On many computer keyboards, the grave accent occupies a key by itself, and is meant to be combined with vowels as a multi-key combination or as a dead key to modify the following letter. However, programmers have used the key by itself for a number of tasks.
On a Mac, to get a character, such as à, the user must type Option-` and then the vowel. For example, to make à, the user must type Option-` and then 'a', and to make À, the user must type Option-` and then Shift-a.
On a QWERTY keyboard, the grave accent key is placed in the top left corner. In many PC based computer games the key is used to open the console window, allowing the user to execute commands via a CLI.
When using TeX to typeset text, the grave accent on its own is used in lieu of a dedicated open-quote key. For example,
` becomes a single opening quote (‘) and
`` becomes a double opening quote (“). Compared to algorithmic ‘smart quotes’ available in modern word processors, this method has the advantage of it becoming completely unambiguous (consider "
the ’60s" or the archaic "
’twas" – most modern word processors would incorrectly render these as "
the ‘60s" and "
‘twas", respectively). The primary disadvantage is that it requires the user to adjust to this style.
Many of the Unix shells and the programming languages Perl and PHP use pairs of this character—known as backquote or backtick—to indicate substitution of the standard output from one command into a line of text defining another command. For example, echo `date` might execute echo Sat Mar 1 09:43:00 GMT 2008 and print Sat Mar 1 09:43:00 GMT 2008.
In Lisp macro systems, the backquote character (called quasiquote in Scheme) introduces a quoted expression in which comma-substitution may occur. It is identical to the plain quote, except that symbols prefixed with a comma will be replaced with those symbols' values as variables. This is roughly analogous to the Unix shell's variable interpolation with
$ inside double quotes.
In MySQL, it is used in queries as a table and database classifier.
In Pico, the backquote is used to indicate comments in the programming language.
Microsoft Powershell uses the backquote as the escape character. For example, a newline character is denoted
`n. Most commonly used programming languages use a backslash as the escape character (e.g.
n) but because Windows allows the backslash as a path separator, it would have been impractical for PowerShell to use backslash for a different purpose.
In the Python programming language, "backticks" are used as a synonym for the
repr() function, which converts its argument to a string suitable for a programmer to view. However, this feature has been removed in the upcoming Python 3000. Backticks are also used extensively in the reStructuredText plain text markup language (implemented in the Python docutils package).
In Verilog the grave accent is used to define constants (e.g. after the line
`define NUM 100,
`NUM can be used as a synonym for
100) whereas the apostrophe is used in specifying sized constants (for example,
5'd10 is a 5-bit constant with the value 10). Accidental use of an apostrophe instead of a grave accent and vice versa is a source of frequent beginner mistakes in the language.
In Unlambda, the backquote character denotes function application.