2.2. Controlling text properties with style
CSS font properties provide a more logical set of tools to control the way texts are displayed on a Web page. They are more powerful than the FONT attribute introduced in HTML 3.x or earlier. Thus, unless backward compatibility is required, CSS properties are used throughout this book.
Some frequently used CSS properties related to font are listed in Table 2.1.
CSS property | CSS values | NS | IE | Description | CSS version |
---|---|---|---|---|---|
Color | #rrggbb color name | 4.+ | 4.+ | Sets the color of the font in 24-bit red, green, blue mode | CSS1 |
Font | font-family, font-size, font-style, font-weight | 4.+ | 4.+ | A shorthand property to set all font values | CSS1 |
Font family | Family nameGeneric family | 4.+ | 4.+ | A prioritized ... |
Get Practical Web Technologies 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.