white-space characters

For control and predictability

You’re now famil­iar with the essen­tial alpha­betic, numeric, and sym­bol char­ac­ters. We turn to the fre­quently over­looked white-space char­ac­ters —the key­board char­ac­ters that put blank space between point A and point B.

There are six impor­tant white-space char­ac­ters: the word space, the nonbreaking space, the tab, the hard line break, the carriage return, and the hard page break.

But if all white space looks the same when printed, why should I care?” Two rea­sons: con­trol and pre­dictabil­ity.

Con­trol means you get the intended result with the min­i­mum key­strokes. Sup­pose you need a para­graph to start at the top of the next page. What do you do? If you use a hard page break rather than a sequence of car­riage returns, you get the job done with one key­stroke.

Pre­dictabil­ity means that as you edit and refor­mat, you’ll always get the same result. If you approx­i­mate a hard page break with car­riage returns, at some point in your edit­ing, your text will reflow and you’ll have a large, unex­pected gap where you intended a page break. Then you’ll have a new prob­lem to diag­nose and fix. But a hard page break will always do the right thing.

The time you invest in learn­ing how to use white-space char­ac­ters will be paid back in lay­outs that snap together faster and require less fid­dling.