HTML Entity Detail

HTML Entity - Backslash

Backslash 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.

Symbol preview
\
Unicode

U+0005C

HTML entity

\

CSS code

\005C

Usage Examples

Use the HTML entity to safely display reserved HTML characters in web content. For example, if you want to show a code snippet on your page, use &lt;div&gt; instead of raw <div> to prevent the browser from interpreting it as HTML.

Common Mistakes

⚠️

Mistake: Forgetting to encode special HTML characters in user-generated content

Fix: Always encode &, <, >, ", and ' as HTML entities when displaying user input to prevent XSS attacks and rendering issues.

⚠️

Mistake: Using HTML entities inside <script> or <style> tags where they won't be parsed

Fix: HTML entities are only parsed in HTML context. In JavaScript strings, use escape sequences like \x26 instead of &amp;.

Backslash

Select any code to highlight it before copying.

Category: Special Chars & Html
Unicode U+0005C
Hex Code &#x5c;
HTML Code &#92;
HTML Entity &bsol;
CSS Code \005C
Windows Shortcut
Mac Shortcut
HTML code example
CSS code example
Last updated: 21 Jun 2026