HTML Entity for Left Bracket ([)

Beginner
⏱️ 5 min read
📚 Updated: Jun 2026
🎯 1 Code Example
Unicode U+005B

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

Unicode U+005B

Basic Latin (ASCII)

Hex Code [

Hexadecimal reference

HTML Code [

Decimal reference

Named Entity [

Most readable option

Reference Table
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 ({)
1

Complete HTML Example

A simple example showing the Left Bracket ([) using the named entity, hexadecimal code, decimal HTML code, and a CSS content escape:

html
<!DOCTYPE html>
<html>
<head>
 <style>
  #point:after{
   content: "\5B";
  }
 </style>
</head>
<body>
<p>Symbol using Hexadecimal: &#x5B;</p>
<p>Symbol using HTML Code: &#91;</p>
<p>Symbol using HTML Entity: &lbrack;</p>
<p id="point">Symbol using CSS Entity: </p>
</body>
</html>
Try it Yourself

🌐 Browser Support

The Left Bracket ([) is part of Basic Latin and renders in all modern browsers:

Chrome 1+
Firefox 1+
Safari 1+
Edge 12+
Opera 4+
Android 4.4+
iOS Safari 1+

👀 Live Preview

See the Left Bracket ([) in code, array, and math contexts:

Array syntax [1, 2, 3]
Math interval [a, b]
URL example ?filter[0]=name
Large glyph [
Bracket pair [ ] { }
Entity refs &lbrack; &#x5B; &#91; \5B

🧠 How It Works

1

Named HTML Entity

&lbrack; is the named entity for the Left Bracket (left square bracket). It is easy to read in code and documentation markup.

HTML markup
2

Hexadecimal Code

&#x5B; uses the Unicode hexadecimal value 5B. The x prefix indicates hexadecimal format.

HTML markup
3

Decimal HTML Code

&#91; uses the decimal Unicode value 91 for the same symbol.

HTML markup
4

CSS Entity

\5B is used in CSS stylesheets in the content property of pseudo-elements like ::after.

CSS stylesheet
=

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:

💻 Code snippets

Display literal [ in programming tutorials, API docs, and array examples.

📋 Array notation

Show array syntax, e.g. [1, 2, 3], in documentation and examples.

🔗 URLs

Document URL patterns or query parameters that include square brackets.

🔢 Math intervals

Intervals, e.g. [a, b], or matrix notation in math content.

⌨ Escaping

Show [ in regex or config examples without HTML parsing issues.

🛠 API docs

Document indexed parameters or bracket-style placeholders in APIs.

💡 Best Practices

Do

  • Prefer &lbrack; in HTML for readability
  • Use <pre> and <code> for multi-line code samples with brackets
  • Pair with &rbrack; (]) 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 &lbrack; (U+005B) with &lbrace; (U+007B, left curly brace)
  • Confuse &lbrack; with &lpar; (U+0028, left parenthesis)
  • Use CSS \5B inside 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

1

Four ways to render U+005B in web content

&lbrack; &#x5B; &#91;
2

For CSS, use \5B in the content property

3

Unicode U+005B — LEFT SQUARE BRACKET

4

Basic Latin block (U+0000–U+007F) — ASCII punctuation

5

Previous: Left Brace ({)   Next: Left Dashed Arrow

❓ Frequently Asked Questions

Use &lbrack; (named), &#x5B; (hex), &#91; (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.
In code snippets, array notation, URL encoding examples, mathematical intervals, and any content that requires a literal left square bracket.
Named and numeric HTML references (&lbrack;, &#91;, &#x5B;) go in markup. The CSS escape \5B is used in stylesheets, typically on ::before or ::after. Both produce [.
Yes. &lbrack; is the named HTML entity for U+005B. You can also use &#91; (decimal), &#x5B; (hex), or \5B in CSS.

Explore More HTML Entities!

Discover 1500+ HTML character references — arrows, symbols, math operators, and more.

All HTML Entities →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful