Forward slash

Updated: 03/12/2022 by Computer Hope
Forward slash

Alternatively referred to as a solidus, virgule, upward slash, or whack, the forward slash is the name of the "/" character on the computer keyboard. Forward slashes most commonly used to describe a network address, URL's, and other addresses. For example, in the below Computer Hope URL, the forward slash is used three times.

Although "slash" is most often used to describe the forward slash, it can also describe a backward slash. It's better to say "forward slash" instead of "slash" when telling someone to enter a forward slash.


Early typewriters and computer keyboards only had a forward slash. The backward slash was not made popular until the introduction of MS-DOS.

Where is the forward slash key on the keyboard?

Below is an overview of a computer keyboard with the forward slash keys highlighted in blue. One key appears on the main keyboard. The other key is on top of the numeric keypad. Its primary use is to represent the mathematical division operator, as on a calculator.

Tilde key

How to create a forward slash

Creating the "/" symbol on a U.S. keyboard

On English keyboards, the forward slash is on the same key as the question mark key next to the right Shift key.

Creating the "/" symbol on a smartphone or tablet

To create a forward slash on a smartphone or tablet open the keyboard and go into the numbers (123) or symbols (sym) section and tap the / symbol.

What are the other uses of the forward slash?

A forward slash may also be used for any of the following reasons.

Math formula

In a math formula, a forward slash is used to represent a division (divide). For example, in the below formula you can see that 10 <divided by> 2 is equal to 5.

10 / 2 = 5

Separate the month, day, and year of a date

Forward slashes are used in many parts of the world to separate the month, day, and year of a date. For example, in the United States, 5/14/2019 is May 14, 2019.


Different parts of the world have different date formats. For example, instead of the above format of M/dd/yy, it may be formatted as yy/MM/dd or dd-MMM-yy.

Nonexecutable statement in computer programming

Another example of a forward slash is in the nonexecutable statement used with some programming languages. For example, in the following PHP code, the comment "hidden text" would not show when executed because it is surrounded by a forward slash and an asterisk.

/* hidden text */
echo "hello world";

Express emote in online game

In many online games, the forward slash is used to have their online character express an emote (emotion). For example, typing "/wave" would make their character wave to other players.

Closing tags in HTML and XML

With HTML, XML, and other markup languages, the forward slash is used with closing tags to let the browser or reader know when a tag ends. Below is an example of a bold HTML tag with a beginning and end tag surrounding "bold text" and making it bold.

Example of <b>bold text</b>.

Command line switch or another program option

In MS-DOS and the Windows command line, the forward slash is used to perform a command option or switch. For example, with the below dir command, the /p performs the directory listing one page at a time.

dir /p

With chat, the forward slash starts a command. For example, in IRC, /msg is a message command that message's another person chatting.

In online games, the forward slash starts an action. For example, in World of Warcraft, typing /dance into chat makes your character dance.

A forward slash in a spreadsheet program

In spreadsheet programs like Microsoft Excel, a forward slash is used in formulas for a division. For example, in the following formula, cell A1 is divided by cell B1.


When not used in a formula a forward slash with only numbers is treated as a date. For example, if you entered "2/1" in a cell, Excel treats the cell as the date "1-Feb" or "2/1/2019."

Regular expression delimiter

With a regular expression, a forward slash is used as a delimiter or separator. For example, in the following Perl regular expression, all of the letter "a" characters are replaced with the letter "b" in the $example variable.

$example =~ s/a/b/g;

Execute a Linux program

In Linux, ./ executes a compiled program.

Separate files and directories in a path

In a Linux or network file path, a forward slash is used to separate files and directories.

What is the other symbol on the forward slash key?

On U.S. keyboards, the forward slash key is shared with the question mark key, which may be shown next to or above the forward slash symbol. To create the question mark, hold down the Shift while also pressing the / key.

Backslash, Divide, Forward, Keyboard terms, Slant, Slash, Whack