Tips & Tricks•9 min read•

What Does <> Mean in Code? Every Angle Bracket in 1,350 Snippets, Counted

Yash Rai
Yash Rai
Founder, TurboType
What Does <> Mean in Code? Every Angle Bracket in 1,350 Snippets, Counted

The short answer: < and > are the less-than and greater-than signs, called angle brackets when they come as a pair. In code they rarely compare anything. They wrap HTML tags like <div> and generic types like List<String>, end the arrows -> and =>, and send output to C++ streams with <<. Written together, <> is Java's diamond operator, or "not equal" in SQL and Excel. We sorted all 3,710 angle brackets in 1,350 code snippets by what they do: only 6.6% were comparisons.

Key Findings

  • •

    Only 245 of 3,710 angle brackets compare two values, 6.6%. Leave out the HTML & CSS track and it is still only 9.2%.

  • •

    Tags and generic types make up 60%: 1,140 characters open or close HTML and JSX tags, and 1,086 wrap types such as List<String>.

  • •

    Every arrow ends in >, so > outnumbers < by 2,055 to 1,655. Our snippets contain 759 arrows.

  • •

    Each language has its own main use: streams in C++ (47%), generics in Java and TypeScript (78% and 79%), -> in PHP (57%), => in JavaScript (79%) and comparisons in C (41%).

  • •

    Python uses them least, 3.0 per 1,000 characters against 67.9 in HTML, partly because Python writes generic types with square brackets: list[int].

Source: TurboType analysis of 1,350 code snippets in nine languages, 208,003 non-space characters, November 2026.

1. What < and > Are Called

On their own, < is the less-than sign and > the greater-than sign. When they surround something, as in <div> or Vec<i32>, programmers call them angle brackets, and sometimes chevrons or pointy brackets. Paired with other symbols, they make operators that have names of their own:

SymbolNameWhere you see it
< >Angle brackets, chevronsHTML tags, generic types, #include
<>Diamond operator; not-equal operatorJava; SQL, Excel and Visual Basic
->Arrow, thin arrow; object operator in PHPC and C++ pointers, PHP objects, return types, Java lambdas
=>Fat arrow, double arrow; hash rocket in RubyJavaScript arrow functions, PHP arrays, Rust match
<< >>Left and right shift; stream insertion and extractionBit operations; C++ input and output
<= >=Less than or equal to, greater than or equal toComparisons in every language
<=>Spaceship operator, three-way comparisonPHP, C++20, Ruby, Perl
::<>TurbofishRust, as in collect::<Vec<_>>()
<-Left arrowAssignment in R, channels in Go

Strictly, the angle brackets of mathematics are different characters, ⟨ and ⟩, which standard keyboards do not have. Code uses the less-than and greater-than signs for every job in this article. For the names of the other 30 symbols on the keyboard, see our guide to programming symbols.

2. The Seven Jobs of < and >

We went through the 1,350 snippets in TurboType's practice tracks, 150 each in C, C++, Java, JavaScript, TypeScript, PHP, Python, Rust and HTML & CSS, and put every < and > into one category by what it was doing. There were 3,710 of them, 17.8 per 1,000 non-space characters, and 737 of the 1,350 snippets contain at least one.

Bars of what the 3,710 angle-bracket characters in our code snippets are used for: HTML and JSX tags 1,140 (30.7 percent), generic types 1,086 (29.3), the arrow -> 411 (11.1), the arrow => 348 (9.4), C++ streams 340 (9.2), comparisons 245 (6.6), #include 92 (2.5), everything else 48 (1.3).
Figure 1. What each angle-bracket character in 1,350 snippets is doing.

Tags: 1,140 (30.7%)

Every HTML element opens with < and closes with >: <p>, </p>, <img src="logo.png" alt="">. The HTML & CSS track supplies 1,056 of these characters. The rest are JSX and HTML strings in TypeScript and JavaScript (42), HTML in PHP strings and templates plus PHP's own <?php tag (22), and one HTML template stored in a Python string (20). A tag starting </ closes an element, and <!-- --> wraps an HTML comment.

Generic types and templates: 1,086 (29.3%)

Here the brackets hold a type, which says what a container holds or which type a function works with: List<String> in Java, Vec<i32> in Rust, Promise<User> in TypeScript, std::vector<int> and template<typename T> in C++. The four languages that have them split the total: TypeScript 348, C++ 298, Java 256 and Rust 184. Python, Go and Scala write the same thing with square brackets, as in list[int], which is one reason Python's count is so low.

Arrows: 759 (20.5%)

Two arrows account for one angle bracket in five, and they mean different things in every language:

ArrowLanguageMeaningExampleCount
->PHPProperty or method of an object$user->save()203
->Rust, Python, C++Return typefn area(&self) -> f64104
->C, C++Member through a pointernode->next59
->JavaLambda body, switch casex -> x * 245
=>JavaScript, TypeScriptArrow function, function type(x) => x * 2178
=>PHPArray key, arrow function, match'id' => 196
=>RustMatch arm, macro ruleSome(x) => x74

One PHP line from our snippets shows how crowded this gets: usort($users, fn(User $a, User $b) => $a->age <=> $b->age); has five angle brackets doing three different jobs. Our guide to =>, -> and :: covers the arrows in more depth.

C++ streams: 340 (9.2%)

C++ borrowed the shift operators for input and output: std::cout << "Total: " << total << '\n'; sends values to the screen and std::cin >> n; reads one in. Our C++ snippets write far more than they read: 168 << against 2 >>. The same << in C is a real bit shift, 1 << 4 is 16, but genuine shifts are rare: 14 characters in all our code.

Comparisons: 245 (6.6%)

The job the symbols are named for comes sixth. The 245 characters make 240 operators: < 105 times, > 83, >= 27, <= 20 and the spaceship <=> 5, all in PHP sorting code. PHP's spaceship returns -1, 0 or 1; C++20's returns an ordering value instead. C has the most comparisons, mainly i < n in for loops.

#include: 92 (2.5%)

#include <stdio.h> asks C and C++ for a header from the system's include paths. Your own headers use quotes instead, #include "parser.h", which looks in the current folder first. Our C snippets have 29 bracketed includes and C++ 17.

Everything else: 48 (1.3%)

14 bit shifts; 11 in plain text inside strings, such as "usage: tool <file>"; 7 in regular expressions, where (?<year>\d{4}) names a group and (?<=\$) looks behind; 6 opening PHP heredocs with <<<; 6 aligning text in format strings, as in Python's f"{name:<20}" and Rust's {:>5}; 3 CSS child combinators, ul > li; and 1 in a comment.

3. What Each Language Uses Them For

The same two keys do a different main job in almost every language:

Language< and >Per 1,000 charsMain useSecond use
HTML & CSS1,05967.9Tags, 1,056 (99.7%)CSS child combinator, 3
C++71629.2Streams, 340 (47%)Templates, 298 (42%)
TypeScript44317.1Generics, 348 (79%)=>, 65 (15%)
Rust38114.9Generics, 184 (48%)-> and =>, 74 each (19%)
Java33013.7Generics, 256 (78%)->, 45 (14%)
PHP35612.2->, 203 (57%)=>, 96 (27%)
C21311.5Comparisons, 88 (41%)#include, 58 (27%)
JavaScript1436.7=>, 113 (79%)Tags, 14 (10%)
Python693.0->, 26 (38%)Comparisons and tags, 20 each (29%)
Bars of angle brackets per 1,000 non-space characters: HTML and CSS 67.9, C++ 29.2, TypeScript 17.1, Rust 14.9, Java 13.7, PHP 12.2, C 11.5, JavaScript 6.7, Python 3.0.
Figure 2. Angle brackets per 1,000 non-space characters, by language.

C is the only language where comparisons lead, because it has no generics, no => and no streams. C++ is the densest programming language here, at 29.2 per 1,000, because one line of output such as std::cout << a << ", " << b << '\n'; carries eight. Python is the sparsest, at 3.0: it compares, annotates return types with -> and does little else with them. Even HTML's 67.9 is a little misleading as a typing load, since its brackets come in short, predictable pairs.

4. What <> Means on Its Own

With nothing between them, the two brackets mean one of a handful of very different things:

Where<> meansExample
JavaDiamond operator: the compiler fills in the typeList<String> names = new ArrayList<>();
C++An empty template argument listtemplate<>, std::greater<>{}
React (JSX)A fragment: groups elements without adding a wrapper<><Header /><Main /></>
SQLNot equalWHERE status <> 'done'
Excel, Google SheetsNot equal=IF(A1<>B1, "changed", "")
Visual Basic, Pascal, F#, OCamlNot equalIf a <> b Then
PHPNot equal, the same as !=if ($a <> $b)
HaskellCombine two values, such as joining lists"ab" <> "cd"
PerlRead the next line of inputwhile (my $line = <>) { ... }
Command-line helpA value you must supply (square brackets mark optional ones)git clone <repository> [<directory>]

In our snippets <> appears 28 times, always as an empty type list: 24 Java diamonds and 4 in C++. It never means "not equal": PHP allows that, but our PHP code uses !=. Python 2 also accepted <>, and Python 3 removed it. The only way back is an April Fools' joke, from __future__ import barry_as_FLUFL, which turns <> on and != off.

And </>, a closing tag with the name left out, has become the icon for code itself. You will find it on buttons, in editors and in logos, ours included.

5. Why > Outnumbers <

Tags, generics and includes use the two in pairs, so you would expect equal counts. Instead > wins, 2,055 to 1,655, 24% more. The arrows explain it: all 759 of them contribute a > and no <. C++ output pulls the other way with its 168 <<, but not by enough.

Nested generics produce the most awkward pair: Map<String, List<Integer>> ends in >>, two closing brackets that look exactly like a right shift. Our snippets close two generic lists at once in 34 places, 14 of them in TypeScript. C++ compilers before C++11 really did read >> as a shift there, so older code writes vector<vector<int> > with a space.

6. Typing < and >

On a US keyboard, < is Shift+comma and > is Shift+period, so every one of our 3,710 angle brackets is a shifted key press, 1.8% of all the non-space characters in the code. German, French and Swedish keyboards give < a key of its own, next to the left Shift key, with > on Shift of the same key. A UK keyboard keeps them on comma and period, like the US one. Our keyboard layout comparison maps every code symbol on those layouts.

The arrows are where most mistakes happen. On a US layout, -> and => are a right-little-finger key followed by the right ring finger on period, with the left hand holding Shift. Let go of Shift a moment too early and you get -. or =.. Typing the arrow as one movement, rather than two characters, fixes it faster than slowing down.

To drill each use, go where it is densest: TypeScript and Java for generics, C++ for streams and templates, PHP for -> and =>, and HTML & CSS for tags.

7. Method and Limits

We analysed all 1,350 snippets in TurboType's nine language tracks, 150 per track, 208,003 non-space characters in total, and gave each < and > character exactly one category. A script first marked strings and comments in each language. Inside strings, a tag counted as a tag only when its name is a real HTML element, so "usage: tool <file>" counted as text. A < counted as a generic when it followed a type name, :: or template and found its matching > before a semicolon or an opening brace; everything inside a matched pair was counted with it, except arrows. << and >> in C++ counted as streams on lines that use cout, cerr, cin or another stream, and as shifts elsewhere. The > of an arrow counted once, as an arrow, and <=> as two comparison characters. We then read samples from every category in every language to check the sorting.

Limits: practice snippets are short and focused, so real codebases will have different proportions. Our C++ track leans on std::cout, which raises the stream count; one Python snippet is an HTML template, which supplies all of Python's 20 tags; and the classification is automatic, so a handful of characters may sit in the wrong category. The meanings in the tables describe the languages themselves and hold everywhere.

8. Frequently Asked Questions

What does <> mean in coding?

It depends on the language. Most often the angle brackets wrap something: an HTML tag such as <div>, or a type, as in List<String>. Written together with nothing inside, <> is the diamond operator in Java's new ArrayList<>(), a fragment in React, or not equal in SQL, Excel, Visual Basic and Pascal. In our 1,350 code snippets, only 6.6% of all < and > characters were comparisons.

What are < and > called?

On their own, the less-than sign and the greater-than sign. As a pair around something, angle brackets, also called chevrons or pointy brackets. Combined with other symbols they get their own names: -> is an arrow, => a fat arrow, << and >> are shift operators, <=> is the spaceship operator and <> in Java is the diamond operator.

What does -> mean in programming?

In C and C++ it reads a member through a pointer: p->x is the same as (*p).x. In PHP it reaches a property or method of an object, as in $user->name. In Rust, Python and modern C++ it introduces a function's return type, and in Java it separates a lambda's parameters from its body. PHP's object operator was the most common use in our count, 203 of 411.

What does => mean?

In JavaScript and TypeScript it defines an arrow function, as in (x) => x * 2. In PHP it links an array key to its value, as in 'id' => 1, and it also appears in arrow functions and match. In Rust it separates a match pattern from its result. It appeared 348 times in our snippets.

What does </> mean?

In HTML, </ starts a closing tag, as in </p>. In React, </> closes a fragment opened with <>. On its own, </> is a common icon for code itself, used in logos and on buttons.

Is <> the same as != ?

In SQL, Excel, Visual Basic, Pascal and PHP, yes: <> means not equal. In C, C++, Java, JavaScript and Python 3 it is not a comparison operator, so write != instead. Python 2 accepted <> as not equal, and Python 3 removed it.

Next Steps:

  1. Type a few generic signatures in TypeScript typing practice until Promise<T> comes out without a pause.
  2. Drill -> and => in the PHP track, where both appear on almost every line.
  3. Take the coding typing test and see whether your errors cluster around Shift+period.