HTML Entity - Greater Than ("closing Bracket")
Greater Than ("closing Bracket") is a reserved HTML characters and special typographic symbols. This HTML entity enables web developers to display this character reliably across all browsers without encoding issues.
U+0003E
>
\003E
Use > to display a greater-than sign in HTML. For example: 10 > 5 renders as 10 > 5. In code snippets: if (x > 0) { return x; }
About Greater Than ("closing Bracket")
The greater-than sign (>) normally closes an HTML tag. Browsers are fairly forgiving and will often display a bare > in text, but valid HTML, XML and XHTML still expect it to be written as >.
Like its partner <, the symbol descends from a cursive abbreviation used in medieval manuscripts, in this case for a word related to "greater". It became the standard "is greater than" comparison operator in mathematics and programming.
Encoding by context: in HTML content use >. In XML and SVG a bare > is technically allowed in text but must be escaped inside a CDATA-sensitive context to avoid "]]>" sequences, so escaping it is the safe default. In CSS use the CSS escape, and in JavaScript a literal > is fine.
The most common reason people reach for > is showing code or markup on a page. For example, to display the opening of an HTML comment you write <!--, and to show an arrow or comparison such as "x > 0" in a code sample you write x > 0. Without escaping, the sample can be swallowed by the parser.
Situations that call for > include HTML and XML tutorials, documenting regular-expression or shell syntax, writing mathematical inequalities, and displaying nested generic types such as Map<String, List<Integer>>.
Related characters are ≥ or ≥ for "greater than or equal to" (≥). As with <, keeping > and ≥ distinct matters in both mathematics and documentation.
In short: browsers may render a raw >, but you should not rely on that leniency. Writing > keeps your markup valid, your code samples correct, and your meaning unambiguous across HTML, XML and SVG.
Common Mistakes
Mistake: Using > directly in HTML content instead of >
Fix: Always use > to display a greater-than sign in HTML. Though most browsers handle > leniently, always use > for valid markup.
Mistake: Confusing > (greater-than) with ≥ (greater-than-or-equal)
Fix: Use > for strict inequality and ≥ (≥) for inclusive inequality.
Frequently Asked Questions
What is the HTML entity for a greater-than sign?
Use >. The numeric forms > and > produce the identical > character.
Do I have to escape > in HTML?
It is not strictly required in HTML text because browsers tolerate it, but > is the correct, valid form and is required in several XML contexts.
Why does "-->" cause problems in XML?
The sequence "]]>" is illegal in XML character data, and unseen --> can also close comments unexpectedly. Escaping > as > avoids these pitfalls.
How do I show "x > 0" on a web page?
Write x > 0 in the source, or wrap the snippet in a <pre> or <code> block where you still escape the special characters.
What is the difference between > and ≥?
> means strictly greater than, while ≥ (entity ≥, code point U+2265) means greater than or equal to.
Is > used in URLs?
Not typically. Raw > has no reserved meaning in a URL, but when a value contains it, percent-encode it as %3E for safety.
Greater Than ("closing Bracket")
Select any code to highlight it before copying.
| Unicode | U+0003E |
|---|---|
| Hex Code | > |
| HTML Code | > |
| HTML Entity | > |
| CSS Code | \003E |
| Windows Shortcut | |
| Mac Shortcut | |