HTML Entity for Left Bracket ([)

What You'll Learn
How to display the Left Bracket ([) in HTML using the named entity, hexadecimal, decimal, and CSS escape methods. This symbol is U+005B (LEFT SQUARE BRACKET) in the Basic Latin block (U+0000–U+007F)—the opening square bracket used in code snippets, array notation, URL examples, and mathematical intervals.
Render it with [ (named), [, [, or CSS \5B. Related: U+005D (], right bracket / ]), U+007B ({, left brace / {).
⚡ Quick Reference — Left Bracket
U+005BBasic Latin (ASCII)
[Hexadecimal reference
[Decimal reference
[Most readable option
Name Value
──────────── ──────────
Unicode U+005B
Hex code [
HTML code [
Named entity [
CSS code \5B
Meaning Left square bracket (opening bracket)
Related U+005D = right bracket (])
U+007B = left brace ({)Complete HTML Example
A simple example showing the Left Bracket ([) using the named entity, hexadecimal code, decimal HTML code, and a CSS content escape:
<!DOCTYPE html>
<html>
<head>
<style>
#point:after{
content: "\5B";
}
</style>
</head>
<body>
<p>Symbol using Hexadecimal: [</p>
<p>Symbol using HTML Code: [</p>
<p>Symbol using HTML Entity: [</p>
<p id="point">Symbol using CSS Entity: </p>
</body>
</html>🌐 Browser Support
The Left Bracket ([) is part of Basic Latin and renders in all modern browsers:
👀 Live Preview
See the Left Bracket ([) in code, array, and math contexts:
🧠 How It Works
Named HTML Entity
[ is the named entity for the Left Bracket (left square bracket). It is easy to read in code and documentation markup.
Hexadecimal Code
[ uses the Unicode hexadecimal value 5B. The x prefix indicates hexadecimal format.
Decimal HTML Code
[ uses the decimal Unicode value 91 for the same symbol.
CSS Entity
\5B is used in CSS stylesheets in the content property of pseudo-elements like ::after.
Same visual result
All four methods produce [. Unicode U+005B is in Basic Latin. Previous: Left Brace.
Use Cases
The Left Bracket ([) is commonly used in:
Display literal [ in programming tutorials, API docs, and array examples.
Show array syntax, e.g. [1, 2, 3], in documentation and examples.
Document URL patterns or query parameters that include square brackets.
Intervals, e.g. [a, b], or matrix notation in math content.
Show [ in regex or config examples without HTML parsing issues.
Document indexed parameters or bracket-style placeholders in APIs.
💡 Best Practices
Do
- Prefer
[in HTML for readability - Use
<pre>and<code>for multi-line code samples with brackets - Pair with
](]) when showing balanced bracket pairs - Set
<meta charset="utf-8"> - Keep one encoding style per project for consistency
- Escape brackets in attribute values when they could break parsing
Don’t
- Confuse
[(U+005B) with{(U+007B, left curly brace) - Confuse
[with((U+0028, left parenthesis) - Use CSS
\5Binside HTML text nodes - Assume raw
[is always safe in all HTML contexts without testing - Mix named and numeric entities inconsistently in the same component
Key Takeaways
Four ways to render U+005B in web content
[ [ [For CSS, use \5B in the content property
Unicode U+005B — LEFT SQUARE BRACKET
Basic Latin block (U+0000–U+007F) — ASCII punctuation
Previous: Left Brace ({) Next: Left Dashed Arrow
❓ Frequently Asked Questions
[ (named), [ (hex), [ (decimal), or \5B in CSS content. All four methods render [ correctly.U+005B (LEFT SQUARE BRACKET). Basic Latin block (U+0000–U+007F). Hex 5B, decimal 91. The opening square bracket used in code and math.[, [, [) go in markup. The CSS escape \5B is used in stylesheets, typically on ::before or ::after. Both produce [.[ is the named HTML entity for U+005B. You can also use [ (decimal), [ (hex), or \5B in CSS.Explore More HTML Entities!
Discover 1500+ HTML character references — arrows, symbols, math operators, and more.
8 people found this page helpful
