CSS Text Alignment, Justification

By Xah Lee. Date:

This page shows you how to align and justify text using CSS.

text-align:left Lots of text here, some looooong, some short, of looooooooong and short. Lots of text here, some looooong, some short, of looooooooong and short. Lots of text here, some looooong, some short, of looooooooong and short.

text-align:right Lots of text here, some looooong, some short, of looooooooong and short. Lots of text here, some looooong, some short, of looooooooong and short. Lots of text here, some looooong, some short, of looooooooong and short.

text-align:center Lots of text here, some looooong, some short, of looooooooong and short. Lots of text here, some looooong, some short, of looooooooong and short. Lots of text here, some looooong, some short, of looooooooong and short.

text-align:justify Lots of text here, some looooong, some short, of looooooooong and short. Lots of text here, some looooong, some short, of looooooooong and short. Lots of text here, some looooong, some short, of looooooooong and short.

Liket it? Put $5 at patreon.

Or, Buy JavaScript in Depth

Ask me question on patreon