CSS Text Alignment, Justification

By Xah Lee. Date: . Last updated: .

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.

JS in Depth
XAH  BUY NOW

CSS

Basics

Color

Font

Text Decoration

Box Model

Box Decoration

Layout

Layers

Transform/Animation

Line Wrap

Misc