FANDOM


The font-family property is used in CSS and certain HTML tags. It is used to specify which type of font the text will display. Multiple font choices can be included in case some computers don't have certain fonts installed. To add an extra font choice, you must add a comma (,) after each specific font name. Font names with more than one word, like Arial Black, must be put in between quotation marks ("Arial Black").

To apply this in an HTML document, use:

<span style="font-family:Arial;">Text in Arial font</span>

which produces: Text in Arial font.


<span style="font-family:Courier, Eurostile;">Text in one of two fonts.</span>

This produces text in either Courier or Eurostile font: Text in one of two fonts.


To apply this in CSS, in the h1 element for example, use:

h1 {
    background-color:black;
    color:white;
    font-family:Arial;
}

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.