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 ...
Get Sams Teach Yourself CSS in 10 Minutes 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.