CSS Examples: text-align

Examples

Left: As most young candidates for the pains and penalties of whaling stop at this same New Bedford, thence to embark on their voyage, it may as well be related that I, for one, had no idea of so doing. For my mind was made up to sail in no other than a Nantucket craft, because there was a fine, boisterous something about everything connected with that famous old island, which amazingly pleased me. Besides though New Bedford has of late been gradually monopolizing the business of whaling, and though in this matter poor old Nantucket is now much behind her, yet Nantucket was her great original- the Tyre of this Carthage;- the place where the first dead American whale was stranded.

Right: Where else but from Nantucket did those aboriginal whalemen, the Red-Men, first sally out in canoes to give chase to the Leviathan? And where but from Nantucket, too, did that first adventurous little sloop put forth, partly laden with imported cobblestones- so goes the story- to throw at the whales, in order to discover when they were nigh enough to risk a harpoon from the bowsprit?

Center: Now having a night, a day, and still another night following before me in New Bedford, ere could embark for my destined port, it became a matter of concernment where I was to eat and sleep meanwhile. It was a very dubious-looking, nay, a very dark and dismal night, bitingly cold and cheerless. I knew no one in the place. With anxious grapnels I had sounded my pocket, and only brought up a few pieces of silver

Justify: So, wherever you go, Ishmael, said I to myself, as I stood in the middle of a dreary street shouldering my bag, and comparing the towards the north with the darkness towards the south- wherever in your wisdom you may conclude to lodge for the night, my dear Ishmael, be sure to inquire the price, and don't be too particular.

Styles Used

.left {
	text-align: left;
	border: 1px dotted black;
	width: 50%;
}
.right {
	text-align: right;
	border: 1px dotted black;
	width: 50%;
}
.center {
	text-align: center;
	border: 1px dotted black;
	width: 50%;
}
.justify {
	text-align: justify;
	border: 1px dotted black;
	width: 50%;
}