Font family (HTML)

From Wikipedia, the free encyclopedia

(Redirected from Font face)
Jump to: navigation, search
HTML

Character encodings
Dynamic HTML
Font family
HTML editor
HTML element
HTML scripting
Layout engine comparison
Style sheets
Unicode and HTML
W3C
Web browsers comparison
Web colors
XHTML

 This box: view  talk  edit 

In HTML and XHTML, 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:

Serif: The quick brown fox jumps over the lazy dog.
Sans-serif The quick brown fox jumps over the lazy dog.
Cursive: The quick brown fox jumps over the lazy dog.
Fantasy: The quick brown fox jumps over the lazy dog.
Monospace:  The quick brown fox jumps over the lazy dog.

(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:

Times: The quick brown fox jumps over the lazy dog.
Roman: The quick brown fox jumps over the lazy dog.
Garamond The quick brown fox jumps over the lazy dog.
Palatino The quick brown fox jumps over the lazy dog.
Antiqua The quick brown fox jumps over the lazy dog.
Minion:  The quick brown fox jumps over the lazy dog.
Helvetica The quick brown fox jumps over the lazy dog.
Swiss:  The quick brown fox jumps over the lazy dog.
Impact: The quick brown fox jumps over the lazy dog.
Script: The quick brown fox jumps over the lazy dog.
Decorative: The quick brown fox jumps over the lazy dog.
Blackletter: The quick brown fox jumps over the lazy dog.
Fraktur: The quick brown fox jumps over the lazy dog.
Comic Sans: The quick brown fox jumps over the lazy dog.
Modern: The quick brown fox jumps over the lazy dog.
Courier: The quick brown fox jumps over the lazy dog.
Calibri: The quick brown fox jumps over the lazy dog.
Frosty: The quick brown fox jumps over the lazy dog.

The actual appearance will depend on your browser and the fonts installed on your system. A default installation of Microsoft's Internet Explorer, for instance, always displays Serif and Times as Times New Roman, and Sans-serif and Helvetica as Arial.

Advanced Search
Included Web Search Engines


Safe Search

close

Top Matching Results

Occasionally Search.com will highlight specialized results that are based on the context of your query. Examples of specialized results include specific links to news, images, or video.

Top Matching Results may highlight information from other Search.com pages, content from the CNET Network of sites, or third party content. The listings are based purely on relevance. Search.com does not receive payment for listings in this section but our partners that provide this data may get paid for listing these products.

Sponsored Links

This section contains paid listings which have been purchased by companies that want to have their sites appear for specific search terms and related content. These listings are administered, sorted and maintained by a third party and are not endorsed by Search.com.

Search Results

Search.com sends your search query to several search engines at one time and integrates the results into one list which has been sorted by relevance using Search.com's proprietary algorithm. You can customize the list of search engines included in your metasearch from the preferences.

The search engines that are used in your metasearch may allow companies to pay to have their Web sites included within the results. To view the Paid Inclusion policy for a specific search engine, please visit their Web site. Search.com does not accept payment or share revenue with any search engine partner for listings in this section.