In typography, whitespace is a character to create an empty space. You can create a space between words or sentences by using the spacebar in your keyboard. However, there are more than 25 types of whitespace characters available as per Unicode character database. These whitespace characters are non-printable characters which include carriage-return, tab, non-breaking space used in HTML. If you are looking for of keyboard shortcuts, here is complete list of alt code shortcuts for whitespace characters.
Alt Code Shortcuts for Whitespace Characters
The table shows the complete list of alt code shortcuts for whitespace characters. Check the below sections on how to use decimal and hexadecimal codes along with alt code in Windows and Mac. Entity name is used in HTML code on web documents.
|Symbol Name||Decimal||Hexadecimal||Entity Name|
|Horizontal Tab||0009||0009||	|
|Non-breakable space||0160||00A0|| |
|Ogham Space Mark||5760||1680|
|En Space||8194||2002|| |
|Em Space||8195||2003|| |
|Three Per Em Space||8196||2004|| |
|Four Per Em Space||8197||2005|| |
|Six Per Em Space||8198||2006|
|Figure Space||8199||2007|| |
|Punctuation Space||8200||2008|| |
|Thin Space||8201||2009|| |
|Hair Space||8202||200A|| |
|Zero Width Space||8203||200B||​|
|Narrow Non-Breakable Space||8239||202F|
|Medium Mathematical Space||8287||205F|| |
En and Em Unit
It is important to understand two units used in typography – en and em.
- Em is the current point size used in typography.
- En is half-width of Em.
When you type Em Space or En Space, the width of these whitespace characters will change accordingly.
Inserting Whitespace Characters in Windows
There are multiple ways to insert En Space, Em Space and other whitespace characters in Windows based computers.
1. Alt + Decimal Code for Whitespace Characters
The first option is to use the alt key and the decimal code from the above table.
- First turn on the number lock on your keyboard.
- Press and hold one of the alt keys.
- Type the decimal numbers using the number pad.
- You will see the space is inserted and release the alt key.
- For example, alt + 8194 will insert En Space and alt + 8195 will insert Em Space.
Remember, this method will work with long keyboards having separate number pad layout. Some laptop keyboards also accommodate number pad keys within other keys. However, you can’t use the default number keys above the alphabets for this purpose. Learn more on how to use alt codes in different types of keyboard layouts.
2. Hexadecimal + Alt X Shortcuts for Word
For Word documents in Windows, you can use the hexadecimal to insert various whitespaces.
- First type the hexadecimal code from the above table.
- Press and hold alt key.
- Now press the X key and you will see the space is inserted in your document.
- For example, 00A0 + Alt X will insert a non-breakable space.
This method though works only in Word documents, it works with normal laptop keyboards (no need to have separate number pad).
3. Using Character Map to Insert Whitespace Characters
The next option in Windows is to use the Character Map app. Since this app comes as part of operating system, you can use it with any other app even if the above mentioned alt code shortcuts are not working.
- Use Windows Search to search and open Character Map app. Alternatively, press “Win + R” to open Run prompt, type charmap and press “OK” button to launch the app.
- Click the “Font” dropdown and select “Arial” font”.
- Type “space” in the “Search for” box showing at the bottom of the app and click “Search” button.
- This will filter relevant whitespace characters.
- Since the whitespace will not be visible, you need to click on it to see the name and Unicode point showing.
- After that click on the “Select” button and then “Copy” button to copy the whitespace to clipboard.
- Now open your document and place the cursor where you want to insert a whitespace.
- Press “Control + V” to insert the whitespace character.
Though this lengthy method works on all applications, you have to select a correct font and not all the whitespace characters are available in the list.
Insert White Space Characters in Mac
Similar to Windows computers, you have multiple options in macOS to insert whitespace characters.
1. Using Alt Code Shortcuts for Whitespaces in Mac
Mac keyboard also has two alt keys which are generally called as “option” keys. You can use the option key along with hexadecimal code as explained below.
- First make sure to change the keyboard input method to Unicode Hex Input.
- Press and hold one of the option keys.
- Type the four digit hexadecimal code from the above table for the corresponding whitespace.
- You will see the space is inserted and release the option key.
You can anytime toggle the input method by using the icon in top menu bar.
2. Use Character Viewer App
Character Viewer in Mac is a cool app for inserting all Unicode characters and symbols.
- When you in the document, go to “Edit > Emoji & Symbols” menu. Alternatively, you can press “Fn E” or “Command + Control + Space” shortcuts.
- This will open Character Viewer app, type “space” in the search box and press enter.
- Since whitespace characters will show as empty, you can select the character to see its name and Unicode point.
- Double click on the character to insert it in your document.
Custom Keyboard Shortcuts in Word for En Space and Em Space
By default, Microsoft Word defines some characters as “Special Characters” and assign keyboard shortcuts for them. Though some whitespace characters like En Space and Em Space are included in the special characters list, Word does not have default keyboard shortcuts assigned for them. Good part is that you can create custom keyboard shortcuts to insert the special characters.
- Open a blank document in Word and go to “Insert > Symbol > More Symbols” menu.
- Go to “Special Characters” tab where you can find En Space, Em Space, 1/4 Em Space, and Nonbreaking Space. Only Nonbreaking space has a default shortcut of “Control + Shift + Space”.
- Since there are no default shortcuts assigned for other characters, select the character and click on “Shortcut Key…” button.
- On the pop-up, you can assign any key combination as a shortcut to insert the character. For example, you can assign “Alt + Shift+ >” for Em Space which is not used for any other purposes. Word will show if the shortcut is assigned for other action and make sure the status shows unassigned for not messing up the key combinations with any existing shortcuts.
- You can choose to assign the shortcut for all new documents by selecting “Normal” option for “Save changes in”. Alternatively, choose the document name from the dropdown for applying the changes only to the current document.
Follow the below instructions on Word for Mac:
- When you are in Word document, go to “Insert” from ribbon menu and click “Advanced Symbol” icon.
- Go to “Special Characters” on the “Symbol” pop-up where you can find Em Space, En Space and Nonbreaking Space. Only Nonbreaking Space has a shortcut “Control + Shift + Spacebar” assigned to it.
- Select Em Space and click on “Keyboard Shortcuts…” button.
- On the pop-up, enter your shortcut under “Press new keyboard shortcut” box.
- Good part is that Word for Mac will also show you whether the entered shortcut is already assigned for other purpose. You can make sure it shows unassigned and click on “Assign” button to start using the shortcut.
- Select “Normal.dotm” option from “Save changes in” dropdown to apply the changes to all new documents. If you only want to use the shortcut in current document then select the document name from the list.
- Similarly, you can set a custom shortcut for En Space.
Insert Whitespace in HTML
The best way to insert these characters in a webpage is to use entity name. You can simply use the entity name like   or   to insert En Space and Em Space respectively. Some characters like next line will be automatically inserted when you close the previous tags. For example, the new line will be automatically created when you close the <p> tag with </p> tag.
Alt Code Whitespace Shortcuts Reference
Below is the cheat sheet for alt code shortcuts for whitespace characters. You can right-click and save the image to your computer for offline use.