Special character

Updated: 03/05/2023 by Computer Hope
Hash, Pound, Number, and Octothorpe

A special character is a character that is not an alphabetic or numeric character. Punctuation marks and other symbols are examples of special characters. Unlike alphanumeric characters, special characters may have multiple uses. To prevent problems, some special characters may also need to be escaped or encoded when used in the command line and programming languages.

For example, when creating a web page with HTML, attribute values are surrounded in double-quotes:

<input type="text" size="40" value="Write something cool here!" />

When defining an attribute in HTML, the double-quote symbol has a special meaning: it marks the start or end of the attribute value. Therefore, to include a double quote as part of an attribute value, the extended special HTML character code &quot; must be used instead:

<input type="text" size="40" value="Write something &quot;cool&quot; here!" />

Tip

In HTML, double quotes are only required around attributes that have text values. If the attribute value is a number, double quotes are not strictly required. For example, size=40 and size="40" are both valid attributes. However, it's good practice to surround all HTML attribute values in double quotes for legibility and consistency, even if the value is a number.

Note

Special characters can be used in online forms for malicious reasons if they're not escaped or handled correctly. Some developers may not support special characters in their online forms.

Keyboard special characters

Below lists special characters available on the typical U.S. keyboard, with links to their related pages.

Tip

If you are using Microsoft Windows, you can use the Character Map utility to insert special characters not available on the keyboard, like a check mark or degree symbol.

Key/symbol Explanation
~ Tilde.
` Acute, backquote, backtick, grave, grave accent, left quote, open quote, or a push.
! Exclamation mark, exclamation point, or bang.
@ Ampersat, arobase, asperand, at, or at symbol.
# Octothorpe, number, pound, sharp, or hash.
$ Dollar sign or generic currency.
% Percent.
^ Caret or circumflex.
& Ampersand, epershand, or and symbol.
* Asterisk, mathematical multiplication symbol, and sometimes called a star.
( Open or left parenthesis.
) Close or right parenthesis.
- Hyphen, minus, or dash.
_ Underscore.
+ Plus.
= Equal.
{ Open brace, squiggly brackets, or curly bracket.
} Close brace, squiggly brackets, or curly bracket.
[ Open bracket.
] Closed bracket.
| Pipe, or, or vertical bar.
\ Backslash or reverse solidus.
/ Forward slash, solidus, virgule, whack, and mathematical division symbol.
: Colon.
; Semicolon.
" Quote, quotation mark, or inverted commas.
' Apostrophe or single quote.
< Less than or angle brackets.
> Greater than or angle brackets.
, Comma.
. Period, dot, or full stop.
? Question mark.
Tip

See our keyboard keys page for a full listing of keyboard keys.

ASCII, Character, Non-printing character, Special, Typography terms