Chapter 15. Alignment

<feature><title>What You’ll Learn in This Hour:</title>
  • How to align, justify, and center content with CSS

  • How to indent paragraphs and other HTML elements

  • How to make text that rises above or sinks below the rest of the text, such as subscripts or superscripts

  • How to float an element on the right or left side so that subsequent content wraps around it

Control over text formatting enables you to replace many HTML tags with CSS rules. Effects that were previously available only as presentational markup attributes are part of the Cascading Style Sheets specification and can help you separate presentation from content.

</feature>

Aligning and Indenting Text

The alignment of text defines the way in which the text lines up with the ...

Get Sams Teach Yourself CSS 24 in Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.