- Font family (HTML)
In
HTML andXHTML , a font face or font family is the typeface that is applied to some text.The font family and other presentational attributes of fonts are applied in HTML code using
Cascading Style Sheets (CSS) or the deprecated HTML font element.Sample text.
Using the deprecated HTML font element code:
Sample text.
It is common for publishers to define a list of font families to use when rendering text. These are listed in preferential order, separated by commas (as can be seen above). In this situation, the term 'font-family' (or, in the case of HTML, 'face') is often misunderstood to mean the collection of possible fonts to use when rendering the text (be it on screen, on a printer or otherwise). In fact the list is that of several different font families, each family being of similar fonts. Thus the Times family includes different styles (like roman and italic), and weight (like regular and bold). The last family specified is usually one of the five generic families defined in HTML and CSS, to allow the text to be rendered appropriately even if the specified fonts are not available on that system.
The generic font families defined in HTML and CSS are:
(Under
Windows API , they are identified as Roman, Swiss, Script, Decorative, and Modern, respectively).----
There may be many other font families; however, you cannot expect them to be universally supported. Just see what your browser can make out of it:
The actual appearance will depend on your browser and the fonts installed on your system. A default installation of
Microsoft 'sInternet Explorer , for instance, always displays Serif and Times asTimes New Roman , and Sans-serif and Helvetica asArial .See also
*Presentational markup
*Core fonts for the Web
Wikimedia Foundation. 2010.