O'Reilly logo

HTML5 and CSS3: Visual QuickStart Guide, Seventh Edition by Bruce Hyslop, Elizabeth Castro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Aligning Text

You can set up text so that it always aligns right, left, center, or justified, as desired Image.

Image The alignment of the heading and paragraph text is adjusted after these changes. Don’t forget the hyphen in text-align.

body {     background: #eef;     color: #909;     font: 100% "Palatino Linotype", Palatino, serif;}h1,h2 {     color: navy;     font: 1.375em "Arial Black", Arial, sans-serif;     letter-spacing: .4em;     text-align: center;}h2 {     font-size: .9375em;}p {     font-size: .875em;     line-height: 1.6;     text-align: justify; ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required