Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Underscore
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Typographic symbol (_) (underline)}} {{other uses}} {{Infobox symbol |mark=_ ◌̲ |unicode= {{unichar|005F|LOW LINE}}<br />{{unichar|0332|combining low line|cwith=◌}} | see also= {{unichar|2017|DOUBLE LOW LINE}}<br />{{unichar|2381|Continuous underline symbol}}<br />{{unichar|2382|Discontinuous underline symbol}}<br />{{unichar|FE33}} |variant1={{not a typo|_}}<!--fullwidth--> |variant1 caption={{unichar|FF3F|Fullwidth low line}} | different from= {{Unichar|0331|COMBINING MACRON BELOW|cwith=◌| nlink=Macron below}} }} [[File:MEK II-371.jpg|thumb|right|Underlining was developed for mechanical machines like this [[Underwood Typewriter Company|Underwood]] typewriter which had no '''bold''' or ''[[italic type]]''. The only way to [[Emphasis (typography)|emphasize text]] that was typewritten was to back up the carriage and type underscores beneath the text. Underlining was a workaround for shortcomings in typewriter technology.<ref name=butterick/>]] [[Image:Underlined.SVG|thumb|right|Underscored or underlined text.]] An '''underscore''' or '''underline''' is a line drawn under a segment of text. In [[proofreading]], underscoring is a convention that says "set this text in [[italic type]]", traditionally used on [[Manuscript (publishing)|manuscript]] or [[Manuscript#Modern variations|typescript]] as an [[List of proofreader's marks|instruction to the printer]]. Its use to add emphasis in modern finished documents is generally avoided.<ref name=butterick>{{cite web |last1=Butterick |first1=Matthew |title=Underlining: absolutely not |url-status=live |website=practicaltypography.com|year=2013|access-date=5 August 2015 |archive-date=23 November 2020 |archive-url=https://web.archive.org/web/20201123180309/https://practicaltypography.com/underlining.html |url=http://practicaltypography.com/underlining.html |quote=Don't underline. Ever. It's ugly and it makes text harder to read. Underlining is another dreary typewriter habit... a workaround for shortcomings in typewriter technology.}}</ref> The (freestanding) '''underscore character''', {{char|_}}, also called a '''low line''', or '''low dash''', originally appeared on the [[typewriter]] so that underscores could be typed. To produce an underscored word, the word was typed, the [[typewriter carriage]] was moved back to the beginning of the word, and the word was [[overstrike|overtyped]] with the underscore character. In modern usage, underscoring is achieved with a [[markup language]], with the Unicode [[combining character|combining low line]] or as a standard facility of [[word processing]] software. The free-standing underscore character is used to indicate word boundaries in situations where spaces are not allowed, such as in computer [[filename]]s, [[email address]]es, and in Internet [[Uniform Resource Locator|URL]]s, for example {{code|Mr_John_Smith}}. It is also used as [[List of proofreader's marks|a proofreader's mark]], to indicate that text should be italicised when [[typesetting|typeset]], for instance {{code|_thus_}} is to be rendered as ''thus''. ==Diacritic== {{see also|Macron below|Numero sign}} The combining diacritic, {{unichar|0331|cwith=|nlink=}}, is similar to the combining low line but is shorter. The difference between "macron below" and "low line" is that the latter results in an unbroken underline when it is run together: compare {{char|a̱ḇc̱}} and {{char|a̲b̲c̲}} (only the latter should look like <span style="border: 1px solid #ddd; background-color: #fdfdfd; padding: 1px 1px; text-decoration: underline">abc</span>).<ref name="The Unicode Standard">{{cite book|chapter-url=https://www.unicode.org/versions/Unicode11.0.0/ch06.pdf|title=The Unicode Standard|version=Version 11.0.0|place=Mountain View, CA|publisher=The Unicode Consortium|date=2018|isbn=978-1-936213-19-1|chapter=6.2 General Punctuation|page=273|access-date=2018-12-12|quote=Spacing Overscores and Underscores. U+203E OVERLINE is the above-the-line counterpart to U+005F low line. It is a spacing character, not to be confused with U+0305 COMBINING OVERLINE. As with all overscores and underscores, a sequence of these characters should connect in an unbroken line. The overscoring characters also must be distinguished from U+0304 COMBINING MACRON, which does not connect horizontally in this way.|archive-date=2018-12-21|archive-url=https://web.archive.org/web/20181221100405/http://www.unicode.org/versions/Unicode11.0.0/ch06.pdf|url-status=live}}</ref>{{efn|This text describes how 'low line' ''should be'' implemented and in most cases it usually is (for example, Windows+Firefox, ChromeOS+Chrome). However, it has been observed that the Chrome Browser on at least some releases of Android fails to do so correctly and the line is broken. This is an implementation error. }} ==Modern use== In a [[manuscript]] (or typescript) to be [[typeset]], various forms of underlining (see [[#Manuscripts|below]]) were therefore conventionally used to indicate that text should be set in special type such as [[italic type|italics]], part of a procedure known as [[markup language#History|markup]]. In printed documents underlining is generally avoided, with [[italic type|italics]] or [[small caps]] often used instead, or (especially in headings) using [[capitalization]], [[bold type]] or greater [[body height (typography)|body height]] (font size).<ref name=butterick /> Underlining may still be seen in display work.<ref>{{cite web |title=Underlining Text |first=Ilene |last=Strizver |url=https://www.fonts.com/content/learning/fyti/typographic-tips/underlining-text |website=fonts.com |access-date=15 June 2023 |archive-date=21 March 2023 |archive-url=https://web.archive.org/web/20230321054044/https://www.fonts.com/content/learning/fyti/typographic-tips/underlining-text |url-status=live }}</ref> A series of underscores (like __________ ) may be used to reserve a blank space in text that is later to be filled in by hand, such as on a paper form. It is also sometimes used to create a horizontal line; other symbols with similar [[glyph]]s, such as hyphens and dashes, are also used for this purpose. In [[German language|German]], [[Slovene language|Slovene]] and some other [[Slavic languages]], the underscore has recently gained prominence as the punctuation to form [[gender-neutral language|gender-neutral suffixes]] in gendered nouns and other parts of the speech.<ref>{{cite web |url=https://svetovalnica.zrc-sazu.si/topic/2247/pisanje-mo%C5%A1kih-in-%C5%BEenskih-oblik-in-uporaba-pod%C4%8Drtaja-za-izra%C5%BEanje-spolne-nebinarnosti |title=Pisanje moških in ženskih oblik in uporaba podčrtaja za izražanje »spolne nebinarnosti« |language=Slovenian |trans-title=Writing masculine and feminine forms and using the underline to express "gender non-binary" |work=Jezikovna svetovalnica [Language Counselling Service] |date=2017 |access-date=27 January 2023 |archive-date=1 December 2022 |archive-url=https://web.archive.org/web/20221201132408/https://svetovalnica.zrc-sazu.si/topic/2247/pisanje-mo%C5%A1kih-in-%C5%BEenskih-oblik-in-uporaba-pod%C4%8Drtaja-za-izra%C5%BEanje-spolne-nebinarnosti |url-status=live }}</ref> The underscore is also used in modern editions of Spanish vocal sheet music to indicate [[elision#Spanish|elision]], instead of the [[breve]] below ({{unichar|032E|Combining breve below|cwith=◌|nlink=Breve#Combining breve below}}), which is less convenient to input on a computer. == Mathematics == In mathematical notations, underscores are sometimes used in the following contexts: * [[Vector (mathematics)|vectors]]. Underscores are sometimes used instead of bold face or a variable with an overarrow. E.g.: <math>\underline{v} = \mathbf{v} = \left[v_1\;v_2\right]^\mathbf{T}.</math><ref name="mathworld-Underscore">{{MathWorld |title= Underscore |id= Underscore |access-date= 2023-08-08}}</ref> * [[complex number]]s. Similar to vectors, underscored variable names can indicate a complex-valued variable, especially if the real-valued variable name is reused to indicate the complex variable. For instance, in optics, <math>n</math> is often used for a medium's [[index of refraction]]. When the refractive index has a wavelength-dependent extinction coefficient <math>\kappa</math>, the combined [[complex index of refraction]] is sometimes notated <math>\underline{n} = n + \mathrm{i}\kappa.</math> * minimum bound. Example: <math>\underline{x} < x < \overline{x},</math> where <math>\underline{x}</math> is the lower bound of <math>x,</math> and <math>\overline{x}</math> is the upper bound.<ref>{{cite conference |last1= Huynh |first1= Van-Name |last2= Nakamori |first2= Yoshiteru |last3= Hu |first3= Chenyi |last4= Kreinovich |first4= Vladik |date= May 2009 |title= On Decision Making under Interval Uncertainty: A New Justification of Hurwicz Optimism-Pessimism Approach and its Use in Group Decision Making |format= PDF |conference= ISMVL 2009, 39th International Symposium on Multiple-Valued Logic, 21–23 May 2009 |location= Naha, Okinawa, Japan |url= http://digitalcommons.utep.edu/cs_techrep/107 |doi= 10.1109/ISMVL.2009.65 |url-access= subscription }}</ref> ==Usage in computing== In [[web browser]]s, default settings typically distinguish [[hyperlink]]s by underlining them (and usually changing their color), but both users and websites can change the settings to make some or all hyperlinks appear differently (or even without distinction from normal text).<ref name=butterick/> ===History=== As early output devices ([[Teleprinter]]s, [[cathode-ray tube|CRT]]s and [[line printer]]s) could not produce more than one character at a location, it was not possible to underscore text, so early encodings such as [[Baudot code#ITA2|ITA2]] and the first versions of [[ASCII-1963|ASCII]] had no underscore. IBM's [[EBCDIC]] character-coding system, introduced in 1964, added the underscore, which IBM referred to as the "break character". IBM's report on NPL (the early name of what is now called [[PL/I]]) leaves the character set undefined, but specifically mentions the break character, and gives {{code|RATE_OF_PAY}} as an example identifier.<ref>{{cite report |title=NPL Technical Report |year=1964 |publisher=[[IBM]] |url=http://bitsavers.org/pdf/ibm/npl/320-0908_NPL_Technical_Report_Dec64.pdf |access-date=2011-06-09 |page=23 |archive-date=2008-11-20 |archive-url=https://web.archive.org/web/20081120005542/http://bitsavers.org/pdf/ibm/npl/320-0908_NPL_Technical_Report_Dec64.pdf |url-status=live }}</ref> By 1967 the underscore had spread to [[ASCII-1967|ASCII]],<ref>{{cite web |author-last=Fischer |author-first=Eric |title=The Evolution of Character Codes, 1874-1968 |url=http://www.trafficways.org/ascii/ascii.pdf |access-date=2016-11-16 |journal= |archive-date=2017-03-18 |archive-url=https://web.archive.org/web/20170318185346/http://trafficways.org/ascii/ascii.pdf |url-status=dead }}</ref> replacing the similarly shaped left-arrow character, {{char|←}} (see also: [[Peripheral Interchange Program|PIP]]). [[C (programming language)|C]], developed at Bell Labs in the early 1970s, allowed the underscore in identifiers.<ref>{{cite book |author-last=Ritchie |author-first=Dennis |author-link=Dennis Ritchie |title=C Reference Manual |date=c. 1975 |url=http://cm.bell-labs.com/cm/cs/who/dmr/cman.pdf |access-date=2011-06-09 |archive-date=2015-02-11 |archive-url=https://web.archive.org/web/20150211071452/http://cm.bell-labs.com/cm/cs/who/dmr/cman.pdf |url-status=dead }}</ref> Underscore predates the existence of lower-case letters in many systems, so often it had to be used to make multi-word identifiers, since [[camelCase]] (see below) was not available. ===Programming conventions=== Underscores inserted between letters are very common to make a "multi-word" identifier in languages that cannot handle [[Whitespace character|spaces]] in identifiers. This convention is known as "[[snake_case]]" (the other popular method is called [[camelCase]], where capital letters are used to show where the words start). An underscore as the first character in an [[Identifier|ID]] is often used to indicate an internal implementation that is not considered part of the [[application programming interface|API]] and should not be called by code outside that implementation. In [[Dart (programming language)|Dart]], all private properties of classes must start with an underscore; this usage is also common in other languages such as [[C++]] even though those provide keywords to indicate that members are private. It is extensively used to hide variables and functions used for implementations in [[header file]]s. In fact, the use of a single underscore for this became so common that C compilers had to standardize on a ''double'' leading underscore (for instance <code>__DATE__</code>) for actual built-in variables to avoid conflicts with the ones in header files. [[PHP]] "reserves all function names starting with __ [double underscore] as magical."<ref>{{Cite web|url=http://www.php.net/manual/en/language.oop5.magic.php|title=Magic Methods|date=August 28, 2004|website=php.net|url-status=live|archive-url=https://web.archive.org/web/20040830214446/http://www.php.net/manual/en/language.oop5.magic.php|archive-date=August 30, 2004|access-date=February 3, 2020}}</ref> [[Python (programming language)|Python]] uses names that both start and end with double underscores (so called "dunder methods", as in '''d'''ouble '''under'''score) for magic members used for purposes such as operator overloading and reflection, and names starting but not ending with a double underscore to denote private [[member variable]]s of classes which should be [[name mangling|mangled]] in a manner which prevents them from colliding with members of derived classes unless the classes have the same name ({{code|__bar}} in class {{code|Foo}} will be mangled to {{code|_Foo__bar}}). By convention, members starting with a single underscore are considered private or protected, although this behavior only has inherent effect for modules, where {{code|import *}} statements by default import all names that do not start with an underscore, unless an export list is explicitly defined by the module. A variable named with just an underscore often has special meaning. <code>$_</code> or <code>_</code> is the previous command or result in many [[Read–eval–print loop|interactive shells]], such as those of [[Python (programming language)|Python]], [[Ruby (programming language)|Ruby]], and [[Perl]]. In [[Perl]], <code>@_</code> is a special [[array data type|array]] variable that holds the [[Parameter (computer programming)|argument]]s to a [[function (programming)|function]]. In [[Clojure]], it indicates an argument whose value will be ignored.<ref>{{cite web |url=https://github.com/bbatsov/clojure-style-guide#underscore-for-unused-bindings |title=The Clojure Style Guide |author=Bozhidar Batsov |website=[[GitHub]] |access-date=2019-09-05 |archive-date=2021-01-12 |archive-url=https://web.archive.org/web/20210112052004/https://github.com/bbatsov/clojure-style-guide#underscore-for-unused-bindings |url-status=live }}</ref> In some languages with [[pattern matching]], such as [[Haskell]] and other [[Standard ML|ML]]-family languages, [[Rust]], [[C Sharp (programming language)|C#]], [[Python (programming language)|Python]], [[Prolog]], and the [[Wolfram Language]], the pattern <code>_</code> matches any value, but does not perform [[data binding|binding]], hence it can be reused multiple times in a single pattern and does not require declaration. ===HTML <u> and CSS <span class="anchor" id="HTML"></span>=== The ASCII underscore character can be inserted with the [[SGML entity|entities]] {{code|_}} or {{code|_}} (or {{code|_}} or {{code|_}}). HTML has a [[HTML element#Presentational markup|presentational element]] <code><nowiki><u></nowiki></code> that was originally used to underline text; this usage was [[deprecated]] in HTML4 in favor of the [[CSS]] style <code>{text-decoration: underline}</code>.<ref name=mozilla>{{cite web |url= https://developer.mozilla.org/en-US/docs/Web/HTML/Element/u |title= <nowiki><u>: The Unarticulated Annotation (Underline) element</nowiki> |date= 1 August 2020 |access-date= 9 October 2020 |website= mozilla.org |archive-date= 13 January 2021 |archive-url= https://web.archive.org/web/20210113231939/https://developer.mozilla.org/en-US/docs/Web/HTML/Element/u |url-status= live }}</ref> In HTML5, the tag reappeared but its meaning was changed significantly: it now "represents a span of inline text which should be rendered in a way that indicates that it has a non-textual annotation".<ref name=mozilla /> This facility is intended for example to provide a red wavy line (or wiggly line) underline to flag spelling errors at input time but which are not to be embedded in any stored file (unlike an emphasis mark, which would be). Other styles are also available: doubled, dotted, and dashed.<ref name="W3Schools Online Web Tutorials g824">{{cite web | title=CSS text-decoration-style property | website=W3Schools Online Web Tutorials | url=https://www.w3schools.com/cssref/css3_pr_text-decoration-style.php | access-date=2023-07-08}}</ref> The elements may also exist in other [[markup language]]s, such as [[MediaWiki]]. The [[Text Encoding Initiative]] (TEI) provides an extensive selection of related elements for marking editorial activity (insertion, deletion, correction, addition, etc.). ===Unicode=== [[Unicode]] has a free-standing underscore {{char|_}} at U+005F, inherited from ASCII, which is a legacy of the typewriter practice of underlining using backspace and overtype. Modern practice uses the [[combining diacritic]] {{unichar|0332|combining low line |cwith=◌}} that results in an underline when run together: u̲n̲d̲e̲r̲l̲i̲n̲e̲. Unicode also has {{unichar|0333|combining double low line |cwith=◌}}. In addition, there are single line and double line versions of the [[combining macron below]], a diacritic that applies to single letters only.<ref name="The Unicode Standard"/> {| class="wikitable" |+ Underlining methods and results |- ! Effect!! Using combining diacritic !! Using html span style !! Using macron below |- | single underline || a̲b̲c̲d̲e̲f̲g̲h̲i̲j̲k̲l̲m̲n̲o̲p̲q̲r̲s̲t̲u̲v̲w̲x̲y̲z̲0̲1̲2̲3̲4̲5̲6̲7̲8̲9̲ || {{underline|abcdefghijklmnopqrstuvwxyz0123456789}} ||a̱ḇc̱ḏe̱ |- | double underline || a̲̲b̲̲c̲̲d̲̲e̲̲f̲̲g̲̲h̲̲i̲̲j̲̲k̲̲l̲̲m̲̲n̲̲o̲̲p̲̲q̲̲r̲̲s̲̲t̲̲u̲̲v̲̲w̲̲x̲̲y̲̲z̲̲0̲̲1̲̲2̲̲3̲̲4̲̲5̲̲6̲̲7̲̲8̲̲9̲̲ || {{double underline|abcdefghijklmnopqrstuvwxyz0123456789}} |- | single underline|| A̲B̲C̲D̲E̲F̲G̲H̲I̲J̲K̲L̲M̲N̲O̲P̲Q̲R̲S̲T̲U̲V̲W̲X̲Y̲Z̲ || {{underline|ABCDEFGHIJKLMOPQRTSUVWXYZ}} ||A̱ḆC̱ḎE̱ |- | double underline ||A̲̲B̲̲C̲̲D̲̲E̲̲F̲̲G̲̲H̲̲I̲̲J̲̲K̲̲L̲̲M̲̲N̲̲O̲̲P̲̲Q̲̲R̲̲S̲̲T̲̲U̲̲V̲̲W̲̲X̲̲Y̲̲Z̲̲ || {{double underline|ABCDEFGHIJKLMOPQRTSUVWXYZ}} |} ==="Simulated" underlines in plain-text=== In [[plain-text]] applications, including plain-text [[e-mail]]s where emphasis markup is not possible, the desired emphasis is often indicated by surrounding words with underscore characters. For example, "You must use _emulsion_ paint on the ceiling". Some applications will automatically add [[emphasis (typography)|emphasis]] to text manually bracketed by underscores, either by underlining or by italicizing it (e.g. {{code|_string_}} may render as either {{underline|string}} or ''string''). ===As a marker for incorrectness=== Underline (typically red or wavy or both) is often used by [[spell checker]]s (and [[grammar checker]]s) to denote misspelled or otherwise incorrect text. ==Manuscripts== {{main|List of proofreader's marks}} Depending on local conventions, the following kinds of underlines may be used inline on manuscripts to indicate the special [[typeface]]s to be used:<ref>{{cite web | url= https://www.graphic-design-employment.com/proofreading-marks-chart.html | title= Proofreading Marks Chart -Some of the Most Common Proofreading Marks | website= graphic-design-employment.com | access-date= 9 October 2020 | archive-date= 6 November 2020 | archive-url= https://web.archive.org/web/20201106011350/https://www.graphic-design-employment.com/proofreading-marks-chart.html | url-status= live }}</ref><ref>{{cite book| title = Writers' & Artists' Yearbook 2020 | date=5 September 2019 | isbn=9781472947512 | publisher = Bloomsbury}}</ref> *single dashed underline for {{lang|la|stet}}, 'let it stand', proof-reading mark cancelled. *single straight underline for ''italic type'' *single wavy underline for '''bold type''' *double straight underline for {{sc|small caps}} *double underline of one straight line and one wavy line for '''''bold italic''''' *triple underline for FULL CAPITAL LETTERS (used among small caps or to change text already typed as lower case). ==Underlines in Chinese== In [[Chinese language|Chinese]], the underline is a little-used punctuation mark for proper names ({{zh|t=專名號|s=专名号}}; [[pinyin]]: zhuānmínghào; literally "[[proper name mark]]", used for personal and geographic names). Its meaning is somewhat akin to capitalization in English and should never be used for emphasis even if the influence of English computing makes the latter sometimes occur. A wavy underline ({{zh|t=書名號|s=书名号}}; [[pinyin]]: shūmínghào; literally, "book title mark") serves a similar function, but marks names of literary works instead of proper names.<ref>{{cite web |last1=Tung |first1=Bobby |last2=Chen |first2=Yijun |last3=Eric |first3=Liu |last4=Hui Jing |first4=Chen |last5=Zhengyu |first5=Qian |last6=Fuqiao |first6=Xue |last7=Richard |first7=Ishida |title=Requirements for Chinese Text Layout |url=https://www.w3.org/TR/clreq/ |website=World Wide Web Consortium (W3C) |access-date=22 April 2023 |ref=clreq |archive-date=19 April 2016 |archive-url=https://web.archive.org/web/20160419150639/http://www.w3.org/TR/clreq/ |url-status=live }}</ref> In the case of two or more adjacent proper names, each individual proper name is separately underlined so there should be a slight gap between the underlining of each proper name. ==See also== *[[Overline]] *[[Space (punctuation)|Space Character]] *[[Strikethrough]] *[[Undertie]] *[[Visible space]] ==Notes== {{notelist}} ==References== {{Reflist}} ==External links== {{Wiktionary|underscore|underline|Appendix:Underline}} * {{cite web |url=https://books.google.com/ngrams/graph?corpus=26&smoothing=3&content=Underline%2C+underscore&year_end=2019&year_start=1800&direct_url=t1%3B%2CUnderline%3B%2Cc0%3B.t1%3B%2Cunderscore%3B%2Cc0 |title =Ngram Viewer: comparison of usage of 'underscore' and 'underline'| website=books.google.com | access-date=9 October 2020}} {{navbox punctuation}} {{Typography terms}} [[Category:Punctuation]] [[Category:Typography]] [[Category:Typographical symbols]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Char
(
edit
)
Template:Cite book
(
edit
)
Template:Cite conference
(
edit
)
Template:Cite report
(
edit
)
Template:Cite web
(
edit
)
Template:Code
(
edit
)
Template:Double underline
(
edit
)
Template:Efn
(
edit
)
Template:Infobox symbol
(
edit
)
Template:Lang
(
edit
)
Template:Main
(
edit
)
Template:MathWorld
(
edit
)
Template:Navbox punctuation
(
edit
)
Template:Notelist
(
edit
)
Template:Other uses
(
edit
)
Template:Reflist
(
edit
)
Template:Sc
(
edit
)
Template:See also
(
edit
)
Template:SfnRef
(
edit
)
Template:Short description
(
edit
)
Template:Sister project
(
edit
)
Template:Typography terms
(
edit
)
Template:Underline
(
edit
)
Template:Unichar
(
edit
)
Template:Wiktionary
(
edit
)
Template:Zh
(
edit
)