CHAPTER 8
Formatting Text with CSS
CSS enables you to format the text in your web pages to make them look the way you want. Basic formatting includes the font family, the font size and font weight, and the font color. More advanced formatting includes line height and letter spacing, superscripts and subscripts, and text shadows. You can also insert special characters and emojis in your pages.

Understanding Fonts and How to Use Them
Set the Font Size and Font Weight
Adjust Line Height and Letter Spacing
Create Superscripts and Subscripts
Understanding Ways to Set Color in CSS
Understanding Fonts and How to Use Them
Working with fonts is a crucial part of web development, because fonts control the appearance of text on your web pages and can help convey your website’s message, tone, and style. CSS gives you a wide variety of ways to control fonts and text styling, from essential properties such as font family and font size to more specialized properties such as superscripts, subscripts, and text shadows.
This section gives you an overview of the font properties you can control. The following sections show you how to effect changes in the properties.
Font Families ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access