Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Font family (HTML)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{short description|CSS property in HTML}} {{HTML}} The '''font family''' selection in [[XHTML|(X)]][[HTML]], [[CSS]], and derived systems specifies a list of prioritized fonts and generic family names; in conjunction with correlating font properties, this list determines the particular '''font face''' used to render characters. The family selection is available in two forms: in the deprecated (X)HTML {{tag|font}} element with its {{code|face}} attribute, and in the CSS {{code|font-family}} property. The CSS term ''font family'' is matched with the typographical term ''[[typeface]]'', which is a grouping of fonts defined by shared design styles. A ''[[font]]'' is a particular set of ''glyphs'' (character shapes), differentiated from other fonts in the same family by additional properties such as stroke weight, slant, relative width, etc. The CSS term ''font face'' is matched with "font"; it is decided by a combination of the font family and the additional properties. In both HTML and CSS, the list is separated by commas. To avoid unexpected results, the last font family on the font list should be one of the [[Web typography#Generic font families|generic families]] which are by default always available. In the absence of a font being found, the web browser will use its default font, which may be a user-defined one. Depending on the web browser, a user can in fact override the font defined by the code writer. This may be for personal taste reasons, but may also be because of some physical limitation of the user, such as the need for a larger font size or the avoidance of certain colors. In addition to local fonts, modern web browsers support linking [[Web typography#Web fonts|custom font files]] directly by using the <code>@font-face</code> declaration. Once included, such fonts can be listed in the <code>font-family</code> property, alongside all local and fallback fonts.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)