An underline, also called an underscore, is a more or less horizontal line immediately below a portion of writing. Single and occasionally double ("double-underscore") underlining is used in hand-written or typewritten documents as a way to emphasise key text.
In printed documents underlining is generally avoided, with italics or small caps often used instead, or (especially in headings) using capitalization or bold type. In a manuscript to be typeset, various forms of underlining were therefore conventionally used to indicate that text should be set in special type such as italics, part of a procedure known as markup.
Underlines are sometimes used as a diacritic, to indicate that a letter has a different pronunciation from its non-underlined form.
The following kinds of underlines are used on manuscripts to indicate the special typefaces to be used:
In web browsers, default settings typically distinguish hyperlinks 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).
The HTML special inline element <ins>
, denoting inserted text, is often presented as underlined text. HTML also has a presentational element <u>
, denoting underlined text; that is deprecated in favor of the CSS style {text-decoration: underline}
. The elements may also exist in other markup languages, such as . The Text Encoding Initiative (TEI) provides an extensive selection of related elements for marking editorial activity (insertion, deletion, correction, addition, etc.).