Vertical Line

|

Shortcodes

Copy and paste codes for Vertical Line symbol | to use in your websites, apps, blogs, and more.

Unicode
U+007C
Alt Code
124
HTML Code
|
HEX Code
|
CSS Code
\07C
JS/JSON
\u007C
Unix/C/PHP/JAVA
0x7C
URL-encode
%7C
copied

Customize Vertical Line Symbol

Customize | symbol as you like and download Vertical Line as SVG or PNG or copy its HTML code to use in your projects.

Preview helps customize symbol. Downloaded image and HTML code may have size/spacing differences.
|
 

How to type Vertical Line symbol | ?

Using Vertical Line Alt Code:

You can type the Vertical Line symbol | using your keyboard by using the Alt Code for Vertical Line. Before you begin, ensure that your Num Lock is turned on, and use the Numpad to type the code. Then, follow these simple steps:

  1. Hold down the Alt key on your keyboard.
  2. Type the number 124 using the Numpad.
  3. Release the Alt key.

This will make the | appear on your screen.

How to add Vertical Line symbol in HTML, CSS, and JS?

Insert | Vertical Line using HTML

1. Copy-paste Vertical Line directly:
<span>|</span>
2. HTML Decimal Code:
<span>&#124;</span>
3. Hexadecimal Code:
<span>&#x007C;</span>
Preview: |

Add Vertical Line symbol with CSS

.vertical-line::before {
    content: '\\07C';
}
Preview: Vertical Line

Vertical Line JavaScript Code

1. Direct Symbol:
document.querySelector('.vertical-line').textContent = '|';
2. Unicode Escape for |:
document.querySelector('.vertical-line').textContent = '\u007C';
Preview: |