6

Manipulating the Display of Text

WHAT YOU WILL LEARN IN THIS CHAPTER:

  • The line-height property and how it is used control the space between lines of text
  • The letter-spacing property and how it is used to add or subtract space between the letters that make up a word
  • The word-spacing property and how it is used to add or subtract space between the words of a sentence
  • The text-indent property and how it is used to indent the text of a paragraph
  • The text-align property and how it is used to align the text of a document
  • The text-decoration property and how it is used to underline, overline, and strikethrough text
  • The text-transform property and how it is used to capitalize text or convert text to uppercase or lowercase letters
  • The white-space property and how it is used to control the flow and formatting of text

In this chapter, I look specifically at properties that manipulate the presentation of text. You can manipulate text in a variety of ways, from the length of space between letters in words of text, to the length of space between the words of a sentence, to the spacing between sentences in a paragraph, to how much space is used to indent the text contained in a paragraph.

The text manipulation properties of CSS allow you to design the layout of a document in much the same way as you use a word processing application.

LINE HEIGHT

The line-height property refers to the height of the line on which each line of text appears. The line-height property and its values are outlined ...

Get Beginning CSS: Cascading Style Sheets for Web Design, Third Edition 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.