Typographic alignment
ID: typographic-alignment
Typographic alignment places a line's content relative to its available horizontal space. Common choices align its left edge, align its right edge, centre it or apply text justification. In CSS,
text-align specifies alignment within the line's container, rather than positioning the entire container in the page.[ref]Text in Cascading Style Sheets Level 2 Revision 2 by World Wide Web Consortium. §16.2: alignment within line boxes and text-align values
For a rigid line with natural line width , no indentation, and a left boundary at , the starting positions areThus and give starts 0, 8 and 16. These three choices preserve the internal word spacing. Text justification can instead change that spacing through typesetting glue so the content reaches the intended edges. The alignments therefore solve different geometric tasks even when the same words and computer font are used.
New to topics? Read the docs here!