• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Chapter 7. Working with Fonts

One of the benefits of using CSS is the flexibility it provides for working with fonts. With HTML, you're limited to working with only seven standard font sizes; with CSS, you can specify an unlimited range of font sizes. Besides specifying specific fonts that you want to display, you can also specify a generic font family as a fallback, in case none of your specified fonts are available. You can also change the font weight and set different font variants and styles (italic, oblique, and small caps, for instance).

As discussed previously, HTML's FONT tag is deprecated in HTML 4 in favor of using styles to achieve the same or better results. In this section, you review examples of how to exclusively use CSS styles to control the presentation of fonts in your HTML documents, without using any deprecated elements.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint