What Is an HTML Font Family?

Angela Farrer

A hypertext markup language (HTML) font family is a group of similar typeface choices rendered in the coding of a web page. Setting a generic HTML font family provides a range of fonts that can appear when different web users open a published website. Most computer users have only a limited number of font choices on their machines, depending on factors such as their operating systems and choices of web browsers. Web programmers who code a specific font for all of their text may limit their numbers of site visitors because that font may not render correctly on everyone's monitor screen. Using an HTML font family usually avoids this problem, and experienced web designers usually choose at least one of the three most common font families.

One of the primary uses of HTML code is the decoration of text, such as underlining or highlighting links in a webpage or changing the HTML font style, color and size of the text.
One of the primary uses of HTML code is the decoration of text, such as underlining or highlighting links in a webpage or changing the HTML font style, color and size of the text.

Working with HTML involves a range of design decisions for creating a website that is both interesting and user-friendly. One of the more frequent beginner mistakes is selecting a font that is difficult for many users to read and that may not render correctly in all browsers. This type of text often belongs to the HTML font family designated fantasy or decorative. While these fonts may appear trendy, most web designers recommend that they should only be used sparingly and for an added embellishment such as a drop-cap letter at the opening of a paragraph.

HTML coding determines the font used on a webpage.
HTML coding determines the font used on a webpage.

The three most common choices for web page text are sans-serif, serif, and monospace. Sans-serif letters are constructed from straight lines and include popular fonts such as Arial and Helvetica. Serif fonts such as Times New Roman have ending tails on each stroke of each letter that can make reading large blocks of this text more difficult on a computer screen. Monospace fonts are normally used only for descriptions of tags or code elements to make them stand out from the rest of the web copy; a web site about HTML coding may often have examples of tags rendered in monospace for instance.

Want to automatically save time and money month? Take a 2-minute quiz to find out how you can start saving up to $257/month.

Designating an HTML font family involves giving the web browser instructions to apply the first available font in a group to a web page. If the first font is not available in a certain user's computer system, the browser will search for and render the second available font. A web designer who wishes to apply an HTML font family to a page can use either the font-face tag or the font-family property tag in a cascading style sheet (CSS) declaration.

You might also Like

Discuss this Article

Post your comments
Login:
Forgot password?
Register: