Text Alignment

Text alignment is generally taken for granted on the Web—left alignment suits most purposes most of the time. In order to create a sense of rhythm and movement on your page, helping to guide the reader’s eye around and adding visual interest to the page, a little alignment variation can go a long way.

Set body text alignment to minimize gaps and maximize scanning

Text alignment in Web pages is, by default, to the left, with ragged edges on the right. Justified text—sometimes called newspaper columns, where both edges of the text are aligned—is rare on the Web.


							text-align: left;
						
						
							text-align: justify;
						

In print, justified text is created using a variety of techniques including word spacing, letterspacing, hyphenation, and glyph ...

Get Fluid Web Typography now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.