Less-Than Sign
- Unicode
- U+003C
- Category
- Math
- HTML Entity
- <
- CSS
- \003C
The less-than sign (<) says the left value is smaller than the right one (3 < 5): the open side always faces the larger number. It first appeared, together with >, in Thomas Harriot's algebra, published after his death in 1631. Combined with an equals line it becomes ≤, typed as <= in plain text. Online, <3 is a sideways heart and <- an arrow. The mathematical angle bracket ⟨ and the single guillemet ‹ look similar but are different characters.
On US and UK keyboards < is Shift + the comma key. Many European keyboards have a separate < > key left of Z. On iPhone it is on the #+= page, on Android on the =\< page.
How to Type
- Windows
- Shift+, (US, UK) · Alt+60
- macOS
- Shift+,
- Linux
- Shift+, · Ctrl+Shift+U 3c
- HTML
- <
In Programming
< compares numbers and strings, <= means less than or equal, and <> is "not equal" in SQL. Every HTML tag starts with <, so a literal less-than in page text is written <, and an unescaped < in user input is where XSS attacks begin. Shells feed a file into a command with < (sort < list.txt) and start heredocs with <<; << is also the left-shift operator, and <…> marks generics in Java, C#, TypeScript and Rust (List<String>).