White space

Updated: 04/26/2017 by Computer Hope

Alternatively referred to as spacing or whitespace, white space is any section of a document that is unused or space around an object. White spaces help separate paragraphs of text, graphics, and other portions of a document, and helps a document look less crowded. Using white space effectively in a document keeps the reader reading the document and helps the reader quickly find what they are interested in reading.

How to create white space

White space is created by pressing the return key, spacebar key, or the tab key and can also be created by setting the document's margins and inserting form feeds or tables.

Replacing white space or extra spaces

Using our online text tool you can remove and replace white space or extra spaces in any text.

Spacing in Microsoft Word

Microsoft Word spacingIn Microsoft Word, Spacing is a feature under the Page Layout tab in the Paragraph section that can increase or decrease the spacing above (before) and below (after) each line of text. By default, the spacing is set to Before: 0 pt and After: 10 pt as shown in the picture to the right.

Tip: To see the spacing around a line of text highlight the line, which also highlights the spacing above and below the text.

Every space has a dot in my document

If formatting marks are enabled in a document, each space has a small dot to represent the space character. You can disable this feature by turning off formatting marks.

White space in a regular expression

With many programming languages and when working with a regular expression, white space is matched by using the \s escape sequence. For example, with the Perl code below if the $example variable contains any space, the script would print "I found white space!" when ran.

if ($example =~ /\s/) { print "I found white space!"; }

How to handle spaces in the command line

When working on the command line, you may encounter errors when typing a file name with spaces. You can prevent errors by surrounding any files with spaces with quotes to help identify where a file begins and ends.

Double space, Keyboard terms, Line space, Nbsp, Space, Underscore