Font family (HTML)

Font family (HTML)

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:

(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's Internet Explorer, for instance, always displays Serif and Times as Times New Roman, and Sans-serif and Helvetica as Arial.

See also

*Presentational markup
*Core fonts for the Web


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать реферат

Look at other dictionaries:

  • HTML element — This article is about the HTML elements in general. For information on how to format Wikipedia entries, see Help:Wiki markup and Help:HTML in wikitext HTML HTML and HTML5 Dynamic HTML XHTML XHTML Mobile Profile and C HTML Canvas element Character …   Wikipedia

  • HTML — For the use of HTML on Wikipedia, see Help:HTML in wikitext. HTML (HyperText Markup Language) Filename extension .html, .htm Internet media type text/html Type code TEXT …   Wikipedia

  • Comparison of layout engines (non-standard HTML) — HTML HTML and HTML5 Dynamic HTML XHTML XHTML Mobile Profile and C HTML Canvas element Character encodings Document Object Model Font family HTML editor HTML element HTML Frames HTML5 video HTML scri …   Wikipedia

  • Font — This article is about the traditional meaning of font . For the electronic data file, see Computer font. For other uses, see Font (disambiguation). In typography, a font is traditionally defined as a quantity of sorts composing a complete… …   Wikipedia

  • Dynamic HTML — HTML HTML and HTML5 Dynamic HTML XHTML XHTML Mobile Profile and C HTML Canvas element Character encodings Document Object Model Font family HTML editor HTML element HTML Frames HTML5 video …   Wikipedia

  • Comparison of layout engines (HTML) — HTML HTML and HTML5 Dynamic HTML XHTML XHTML Mobile Profile and C HTML Canvas element Character encodings Document Object Model Font family HTML editor HTML element HTML Frames HTML5 video HTML scrip …   Wikipedia

  • Microdata (HTML) — HTML HTML and HTML5 Dynamic HTML XHTML XHTML Mobile Profile and C HTML Canvas element Character encodings Document Object Model Font family HTML editor HTML element HTML Frames HTML5 video HTML scrip …   Wikipedia

  • Character encodings in HTML — For a list of character entity references, see List of XML and HTML character entity references. HTML HTML and HTML5 Dynamic HTML XHTML XHTML Mobile Profile and C HTML Canvas element Character encodings Document Object Model Font family HTML… …   Wikipedia

  • C-HTML — Evolution of mobile web standards HTML HTML and HTML5 Dynamic HTML …   Wikipedia

  • Unicode font — A Unicode font (also known as UCS font and Unicode typeface) is a computer font that contains a wide range of characters, letters, digits, glyphs, symbols, ideograms, logograms, etc., which are collectively mapped into the standard Universal… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”