The first paragraph in this example will use different fonts than the other paragraphs. In this case, it will be styled with times, "times new roman", serif. Fonts such as Times New Roman, which have spaces in their names, should always be wrapped in quotation marks. The next step is to style the text italic and bold. This is achieved using font-style: italic; and font-weight: bold;. To align the text in the center of the screen, use text-align: center. The font size can be increased using font-size: 110%; and the font color can be set using color: #900; as shown in Listing 7.5 (see Figure 7.4). Listing 7.5. CSS Code Containing Styles for the First Paragraphp { font-family: arial, helvetica, sans-serif; font-size: 80%; line-height: 1.4; } p.introduction { font-family: times, "times new roman", serif; font-style: italic; font-weight: bold; text-align: center; font-size: 110%; color: #900; } Figure 7.4. Screenshot of styled first paragraph. |