O'Reilly logo

Sams Teach Yourself CSS in 10 Minutes by Russ Weakley

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 7. Formatting Text

In this lesson, you will learn how to style text using font, size, alignment, and color properties instead of the <font> element.

Setting Up the HTML Code

The HTML code for this lesson contains three paragraphs of text as shown in Listing 7.1. The contents of these paragraphs are wrapped inside <font> elements. The first paragraph has been set to a larger font size. It also has been colored and styled in bold and italic. The results are shown in Figure 7.1.

Example 7.1. HTML Code Containing Markup for Lesson 7

<p align="center"> <font size="4" color="#990000" face="times, times new roman"> <b><i>Lorem ipsum dolor sit amet, consectetuer adipiscing elit...</i></b></font> </p> <p> <font size="2" face="arial, helvetica"> Ut ...

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