TAILIEUCHUNG - HTML in 10 Steps or Less- P11

HTML in 10 Steps or Less- P11:Welcome to HTML in 10 Simple Steps or Less. Our mission in writing this book is to provide a quick and accessible way for you to learn Hypertext Markup Language — the lingua franca of the World Wide Web. We hope this book provides a resource that beginning and intermediate HTML coders can use to improve their Web development skills. It is also our hope that it fills multiple roles as both a teaching tool and a reference once you expand your skills. | 176 Part 9 Task gO Working with Font Styling Font styling refers to the font-style font-variant and font-weight properties. The font-style and font-weight properties correspond loosely to HTML s physical styles i and b only in CSS you can control the degree of boldness you prefer. The font-variant property introduces a style possibility lacking from HTML small caps. notes Oblique and italic are essentially the same thing depending on the font. Traditionally oblique fonts are slanted versions of normal fonts while italic fonts have been specifically designed to appear slanted. If the font you choose has a specific oblique version you may see a difference between it and the italic setting. If the font you specify with a font-family property doesn t have a specific oblique state italic will be used instead. In many browsers distinguishing between a font-weight value of 100 and 400 is nearly impossible as is distinguishing between 400 500 and 600. Consequently we recommend using relative keyword values. 1. To specify whether a selector uses a normal italic or oblique font define a font-style property as shown here .citation font-style italic 2. To specify whether a font uses small-caps define a font-variant property set equal to small-caps. In a small-caps font lowercase letters are replaced with uppercase letters of slightly smaller size and proportions. 3. To define a font-variant style that overrides a previous small-caps setting use a value of normal. 4. To regulate the boldness of text include a font-weight property in the declaration. For example font-weight bold The font-weight property accepts relative keyword values of lighter normal bold or bolder. 5. To define the font-weight property using an absolute value use the following scale in increments of 100 100 the lightest to 900 the boldest . Normal font weight is 400 normal bold is 700. Listing 80-1 shows each property in use within a style sheet. Figure 80-1 displays the results in a browser. Please purchase