O'Reilly logo

Beginning CSS: Cascading Style Sheets for Web Design, Second Edition by Richard York

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

Chapter 5. Text Manipulation

In Chapter 4, you learned how certain properties in CSS are inherited and how the cascade determines which style rules are the most important. In this and subsequent chapters, I begin an in-depth look at the individual properties of CSS and how these come together to style a document.

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.

I cover the various CSS text-manipulation properties:

  • 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

The text manipulation properties of CSS allow you to design the layout of a document in much the same way ...

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