Fully Justified Text

A normal HTML page contains mostly text which has been left justified. This means that the text all lines up at the left of the screen but is ragged and does not line up on the right hand edge of the screen. Occasionally you might find some text that is right justified instead or even centred. Right justified text is lined up on the right hand side of the screen but is ragged at the left of the screen while centred text is ragged at both sides of the screen but has the text precisely centred.

You might notice something different about the paragraphs that appear on this page. That's right, the text is perfectly aligned on both the left and right sides of the screen and there is no ragged edge. This is what is called fully justified text and it is as easy to achieve as right or centre justified text is. If you just want to apply full justification to one paragraph then add style="text-align:justify" to the paragraph tag. The paragraph is now fully justified and the ragged edge at the right of the screen will be straightened.

Alternatively if you want to align several paragraphs all in one go then the better solution is to define a .justify class in your stylesheet. You can then apply the class to individual paragraphs or to entire sections of your page.


This article written by Stephen Chapman, Felgall Pty Ltd.

go to top

FaceBook Follow
Twitter Follow