Fonts
The <font>
tag is deprecated in HTML4 and not supported in HTML5. Therefore, it is best to use style sheets (CSS) to define fonts instead.
Tip: Because not all fonts are available on all browsers or operating systems, it is best to provide several font names to ensure maximum compatibility.
The following tables list the most commonly used fonts, organized by their font families.
Serif Fonts
Font Family | Example |
---|---|
Georgia, serif |
HeadingParagraph |
"Palatino Linotype", "Book Antiqua", Palatino, serif |
HeadingParagraph |
"Times New Roman", Times, serif |
HeadingParagraph |
Sans-Serif Fonts
Font Family | Example |
---|---|
Arial, Helvetica, sans-serif |
HeadingParagraph |
Arial Black, Gadget, sans-serif |
HeadingParagraph |
"Comic Sans MS", cursive, sans-serif |
HeadingParagraph |
Impact, Charcoal, sans-serif |
HeadingParagraph |
"Lucida Sans Unicode", "Lucida Grande", sans-serif |
HeadingParagraph |
Tahoma, Geneva, sans-serif |
HeadingParagraph |
"Trebuchet MS", Helvetica, sans-serif |
HeadingParagraph |
Verdana, Geneva, sans-serif |
HeadingParagraph |
Monospace Fonts
Font Family | Example |
---|---|
"Courier New", Courier, monospace |
HeadingParagraph |
"Lucida Console", Monaco, monospace |
HeadingParagraph |
Examples
The following example demonstrates how to set the font of text using styles.
<h2 style="font-family:verdana">
A Styled Heading
</h2>
<p style="font-family:courier">
A styled paragraph
</p>
This produces the following result:
A Styled Heading
A styled paragraph