The less-than sign, <, is an original ASCII character (hex 3C, decimal 60).
In BASIC, Lisp-family languages, and C-family languages (including Java and C++), comparison operator < means "less than".
In Coldfusion, operator .lt. means "less than".
In Fortran, operator .LT. means "less than"; later versions allow <.
In Bourne shell (and many other shells), operator -lt means "less than". Less-than sign is used to redirect input from a file. Less-than plus ampersand (<&) is used to redirect from a file descriptor.
The double less-than sign, <<, may be used for an approximation of the much-less-than sign (≪) or of the opening guillemet («). ASCII does not encode either of these signs, though they are both included in Unicode.
In Bash, Perl, and Ruby, operator <<EOF (where "EOF" is an arbitrary string, but commonly "EOF" denoting "end of file") is used to denote the beginning of a here document.
In C and C++, operator << represents a binary left shift.
In the C++ Standard Library, operator <<, when applied on an output stream, acts as insertion operator and performs an output operation on the stream.
In Ruby, operator << acts as append operator when used between an array and the value to be appended.
In XPath the << operator returns true if the left operand precedes the right operand in document order; otherwise it returns false.1
In PHP, operator <<<OUTPUT is used to denote the beginning of a heredoc statement (where OUTPUT is an arbitrary named variable.)
In Bash, <<<word is used as a "here string", where word is expanded and supplied to the command on its standard input, similar to a heredoc.
The less-than sign with the equals sign, <=, may be used for an approximation of the less-than-or-equal-to sign, ≤. ASCII does not have a less-than-or-equal-to sign, but Unicode defines it at code point U+2264.
In BASIC, Lisp-family languages, and C-family languages (including Java and C++), operator <= means "less than or equal to". In Sinclair BASIC it is encoded as a single-byte code point token.
In Prolog, =< means "less than or equal to" (as distinct from the arrow <=).
In Fortran, operators .LE. and <= both mean "less than or equal to".
In Bourne shell and Windows PowerShell, the operator -le means "less than or equal to".
In the R programming language, the less-than sign is used in conjunction with a hyphen-minus to create an arrow (<-), this can be used as the left assignment operator.
The less-than sign is used in the spaceship operator.
In HTML (and SGML and XML), the less-than sign is used at the beginning of tags. The less-than sign may be included with <. The less-than-or-equal-to sign, ≤, may be included with ≤.
Unicode provides various less than symbols:2
The less-than sign may be seen for an approximation of the opening angle bracket, ⟨. True angle bracket characters, as required in linguistics notation, are expected in formal texts.
In an inequality, the less-than sign and greater-than sign always "point" to the smaller number. Put another way, the "jaws" (the wider section of the symbol) always direct to the larger number.
The less-than-sign is sometimes used to represent a total order, partial order or preorder. However, the symbol ≺ {\displaystyle \prec } is often used when it would be confusing or not convenient to use <. In mathematical writing using LaTeX, the TeX command is \prec. The Unicode code point is U+227A ≺ PRECEDES.
"XML Path Language (XPath) 2.0 (Second Edition)". www.w3.org. W3C. 14 December 2010. Archived from the original on 7 October 2022. Retrieved 29 October 2019. https://web.archive.org/web/20221007124416/https://www.w3.org/TR/xpath20/#id-node-comparisons ↩
"Less than symbol". Archived from the original on 2023-05-16. Retrieved 2023-06-06. https://lessthansymbol.com/ ↩